Reduce unused JavaScript in WordPress
Most WordPress site owners will see the recommendation to “reduce unused Javascript” when they run a PageSpeed test.
The technically complete solution is out of reach for most site owners, but there is an effective shortcut solution for reducing unused JavaScript on your WordPress site that I share below.
What does “reduce unused JavaScript” mean?
JavaScript (JS) is a type of code used on website mostly for interactive elements like sliders, animations etc. Compared to CSS or images, it is much more resource intensive so it takes longer to process when your page is loading. It’s especially bad for mobile performance.
For best performance, you should aim to have as little JavaScript as possible on your site.
Loading JavaScript that isn’t even used on the page is a waste of resources and processing power, and that’s what this PageSpeed recommendation is getting at.