Hummingbird Not Showing Plugin Assets

In Performance Test section, Hummingbird is saying that there are a few JS assets from Nextend Smart Slider Pro plugin causing Render Blocking Issue.
But I don't see those JS assets in Advanced Asset Optimization section. How can I resolve those issues and why Hummingbird is not showing those plugin assets?

  • Konstantinos Xenos
    • Rubber Duck Debugger

    Hi Jack Lavender !

    Smart Slider is not using the "normal WordPress way" of enqueueing it's scripts and styles via wp_enqueue functions and that's why Hummingbird can't show them in the Asset Optimization since they are not registered anywhere in WordPress. To make it a bit more clear, WordPress doesn't even know that those files exist as they are injected into the html code via their own method. Unfortunately since the developers chose this way it's totally up to Smart Slider to handle it's own assets.

    To help a bit I've enabled the Async mode for Smart Slider 3 ( see attached screenshot, you can find these options on Smart Slider -> Settings -> Framework Settings ), this way the scripts will load when needed and not in the initial page load avoiding the render-blocking error. There are more built-in options in Smart Slider to play around on combining, minifying etc it's scripts so you'll have to adjust them to your preferences and needs.

    Please make sure to check yourself as well that all your sliders are loading correctly though as the Async / combining settings might make some to not render correctly. As far as I could check everything was loading fine.


  • Jack Lavender
    • Site Builder, Child of Zeus

    Thank you. I've checked and the site isn't broken (yay!).

    I also have another site using SmartSlider so I'll tweak both later today.

    As a point of clarification, does the approach that the developers took mean that any caching plug-in will not see the SmartSlider assets or is this specific to Hummingbird?

  • Konstantinos Xenos
    • Rubber Duck Debugger

    I'm glad it worked out fine !

    I can't be sure on other plugins to be honest as I don't know their code exactly works at least not for all but I can explain the process in general and it should be pretty clear. Some might even find the assets but that's because they are actually parsing the HTML for any .js .css file they spot and they just grab it, which essentially can also be catastrophic as there are more information needed to do the job correctly.

    WordPress provides 2 global lists of scripts and styles ( $wp_styles, $wp_scripts ). Any of the assets that are properly registered via the wp_enqueue_style() & wp_enqueue_script() functions will end up in those lists. This is the 'tricky' part, when a developer enqueues a script/style also provides dependencies or loading order and other information needed for the theme/plugin to work correctly and in a later stage a proper combine / minification / optimization to be made.

    Hummingbird builds it's assets on top of those lists and that's why we have a 'complex' system that basically enables you as a user to do anything you like, for example : combine only 2 out of 10 scripts, or load only 2 of them in the footer, or skip minification for just 1 script so on and so forth.

    This is exactly why if any of the Authors of plugins or themes 'skip' registering their scripts properly they are basically 'doing it wrong' in a sense.

    The good thing about Smart Slider is that the developers have all the things needed already built-in even though they don't register their scripts via the normal way. Everything is minified, you can select the loading ( footer, async etc ) so you're not going to be missing anything basically as it already takes care of itself on optimization levels.

    I hope this clears things a bit more!


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.