Created an issue for it on the Github tracker.
https://github.com/jazzsequence/progress-bar/issues/3
It might be more trouble than it’s worth — the only way you’d know if the shortcode was in use on a page would be getting into the_content and checking for the existence of the shortcode text (or checking if the widget was being used if you were using the sidebar widget). In either case we’re hitting the database on every page load (possibly twice, once for the_content and once for the sidebar) and possibly dozens or even hundreds of times if we’re looking at an index or an archive page. Not sure that’s worth the small amount of overhead caused by loading the js on every page.
As a theme developer, if you don’t want it to load on every page, you can easily dequeue the js on all pages except those using the shortcode or use some other method to more selectively handle loading the js.
Thread Starter
X-Raym
(@x-raym)
You are definitely rigth, it could have huge performance issues…
It’s ok, i will go with Plugin Organizer 😀
Thanks for your support anf expertise !
Yeah, I think it’s easier to tackle the problem from that angle than to try to do it within the plugin — I appreciate the sentiment but we’re limited by the medium (using a shortcode).
Thanks for understanding and glad you like the plugin 😀