Why Enqueue JQuery on the Frontend for a Plugin Like This?
-
I was happily using your plugin until an hour ago when after the latest update my Google Lighthouse results were impacted by jQuery loading on the frontend.
I regularly check Lighthouse, so adding jQuery to the frontend is new for this plugin, I’m curious why you’ve added jQuery at the last update?
I don’t use plugins which add jQuery, it’s bloated and is pretty much vulnerable most of the time (even the latest release will end up being vulnerable). Run any site using this plugin through Lighthouse and it will report security vulnerabilities due to jQuery. The WordPress core version of jQuery is out of date and reported as vulnerable.
For example https://googlechrome.github.io/lighthouse/viewer/?psiurl=http%3A%2F%2Fmagazine3.company%2F&strategy=mobile&category=performance&category=accessibility&category=best-practices&category=seo&category=pwa&utm_source=lh-chrome-ext has jQuery and it has 2 vulnerabilities. That version of jQuery is from May 2016 https://snyk.io/vuln/npm:jquery?lh=1.12.4&utm_source=lighthouse&utm_medium=ref&utm_campaign=audit. There’s been 11 updates, but WordPress can’t update fully (I believe they did a partial custom update May 2019) due to backwards compatibility with old themes/plugins.
If the plugin doesn’t NEED jQuery on the frontend to function you should remove it.
I’ve had to go back to the previous plugin I was using, no jQuery, but I get a console error. Your plugin gave no errors.
- The topic ‘Why Enqueue JQuery on the Frontend for a Plugin Like This?’ is closed to new replies.