Support » Plugin: Simple Lightbox » using a lot of resources

  • Resolved scruffy1



    I love this plugin, but since update i noticed website has slowed, I ran a scan and noticed the plugin is using 43% of the plugin resources which seems a little too high, scan details below


    Report date: October 7, 2013
    Theme name: Maya Shop
    Pages browsed: 3
    Avg. load time: 10.9848 sec
    Number of plugins: 28
    Plugin impact: 5.46% of load time
    Avg. plugin time: 0.5998 sec
    Avg. core time: 0.0469 sec
    Avg. theme time: 10.2620 sec
    Avg. mem usage: 115.00 MB
    Avg. ticks: 124,795
    Avg. db queries : 209.00
    Margin of error : 0.0760 sec

    Plugin list:
    P3 (Plugin Performance Profiler) – 0.0007 sec – 0.12%
    Page-list – 0.0002 sec – 0.04%
    Remove Comments Are Closed – 0.0347 sec – 5.79%
    Rvg Optimize Database – 0.0002 sec – 0.03%
    Simple Lightbox – 0.2592 sec – 43.21%
    Synmedia Woocommerce Rewards – 0.0038 sec – 0.63%
    UK Cookie Consent – 0.0029 sec – 0.48%
    UpdraftPlus – Backup/Restore – 0.0026 sec – 0.44%
    Use Google Libraries – 0.0054 sec – 0.90%
    Wangguard – 0.0076 sec – 1.27%
    Wc Gateway Nochex – 0.0012 sec – 0.21%
    Woocommerce Currency Converter Widget – 0.0024 sec – 0.41%
    WooCommerce Print Invoices & Delivery Notes – 0.0017 sec – 0.28%
    Woocommerce Email Inquiry Cart Options Pro – 0.0107 sec – 1.78%
    WooCommerce Pro Shipping – 0.0347 sec – 5.78%
    Woocommerce Products Predictive Search Pro – 0.0965 sec – 16.09%
    WooCommerce – 0.0603 sec – 10.06%
    Wordfence Security – 0.0143 sec – 2.39%
    Wordpress Seo – 0.0074 sec – 1.24%
    Wp Email Template Pro – 0.0199 sec – 3.32%
    WP Resized Image Quality – 0.0002 sec – 0.04%
    Wp Robots Txt – 0.0021 sec – 0.35%
    WP SlimStat – 0.0079 sec – 1.31%
    WP to Twitter – 0.0056 sec – 0.94%
    Xml Sitemap Feed – 0.0085 sec – 1.42%
    Yith Custom Login – 0.0040 sec – 0.66%
    Easy Contact Forms – 0.0041 sec – 0.68%
    Amazon S3 And Cloudfront – 0.0009 sec – 0.15%

Viewing 12 replies - 1 through 12 (of 12 total)
  • Nice to see that WP SlimStat only used 1% of your resources. By the way, how did you generate this report?

    used the p3 profiler


    Plugin Author Archetyped


    Hi, thanks for the feedback, performance optimizations are always high priority for SLB.

    Just some clarification regarding the report you provided. It’s not reporting the amount of resources used, but the amount of time it takes to load.

    In SLB’s case, it’s reportedly taking ~0.25 sec to load, which is 43% of the total time it takes all plugins to load.

    The important thing to keep in keep in mind though is that SLB is a content-focused plugin that is loaded on all pages that SLB is enabled for (home, archives, posts, pages, etc.), scans content for links to activate, and loads the necessary code to display links in a lightbox when clicked.

    As a result, the load time of a content-focused plugin cannot be directly compared to other plugins that do not have any effect on the current page. For example, a plugin like “Woocommerce Email Inquiry Cart Options Pro”, which generally only affects the shopping cart page should definitely have less of an impact on total load time on non-shopping cart pages.

    Based on the report you provided, it should also be noted that the theme takes nearly 20x more time to load than all of the plugins (10+ sec vs 0.6 sec), and nearly 40x more time than SLB requires to load. If you are noticing your site is loading more slowly, then you may want to look at optimizing the loading of the theme as that appears to be having much more of an impact on total page loading time.


    thanks, there was a dramatic speed up after we minified the lib js in the plugin, i think we got it down to 40k from around 115k which made quite a difference,

    maybe you can supply plugin when you update with a slightly minified JS ?

    is it possible to get the JS from the plugin to load in the footer ?

    themes are always a pain lol there is little we can do to improve theme, other than use a CDN for the css files but that would take a lot of editing i think


    Plugin Author Archetyped


    All of SLB’s JS is loaded in the page’s footer.

    Further optimizing the JS is a focus of an upcoming release, so there should be some improvements there beyond what minification can offer.


    thanks, ok strange as google reporting it as js to defer so i assumed it is loading in top of page.

    would be great if you can use jsdelivr for the JS


    i also got this message

    lightbox/themes/default/css/style.css should be moved to the document head

    thanks πŸ™‚

    Plugin Author Archetyped


    Yes, CSS in the document head is a baseline recommendation, unless there is a specific reason for it, as in SLB’s case.

    Loading SLB’s CSS in the footer (instead of the head) actually speeds up loading for users compared to loading it in the header.


    the search engines etc penalise for certain things and advise against it,

    i would prefer the css where it should be to be honest or even be able to have it one a cdn πŸ™‚

    Plugin Author Archetyped


    There are no penalties for SLB’s CSS placement. As I said previously, CSS in the head is a baseline recommendation, but there are also good reasons for including it elsewhere. If you have references to the contrary, then I’d be glad to take a look.

    SLB’s assets will likely never be loaded via a CDN by default as that would make the plugin’s functionality dependent on whether a CDN is accessible or not. There are several CDN options (along with plugins for WP) available for users to select from if they would like to configure their site to use a CDN. Optimized support for specific CDNs will be added to SLB via add-ons based on demand.

    hi these should shed some light on it

    Why Not Put Style Sheets at the Bottom of the Page

    You may already know that scripts are best placed at the bottom of your HTML documents, just before the </body> tag. This helps the page load and display before setting up scripts that can block parallel downloads. But this does not apply to style sheets. When you place a style sheet at the bottom, this prevents many browsers, especially Internet Explorer, from doing progressive rendering. Internet Explorer even blocks rendering of the page until all the styles are added, so that it doesn’t have to redraw the page. This means that customers will see a blank white page until all the elements and styles have been loaded.
    above taken from

    all in all it is not the thing to do

    as for the CDN , slimstat plugin has a great system you can select via checkbox if you want the js to load from the plugins folder or from CDN they use the free jsdelivr cdn service which anyone can load a script from to their site via a simple link, this gives the user the ability to select the faster cdn without paying for it πŸ™‚

    Plugin Author Archetyped


    Thanks for the links. I didn’t see anything related to penalties by search engines, but I’ll take another look and update SLB where necessary.

    Thanks again.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘using a lot of resources’ is closed to new replies.