The recommendation says:
Consider reducing the time spent parsing, compiling, and executing JS. You may find delivering smaller JS payloads helps with this
This means that JS, once downloaded, has to be "read" and "understood" by the browser (parsed and compiled) and is then executed within the browser.
The more JS there is, the more time the browser will need to parse, compile and execute it.
How to find the problematic files
In the example above, the JS files are combined into one single JS file by WP Rocket, so you can’t see which file(s) take too much time.
To identify these scripts in detail, analyze your non-cached version bypassing WP Rocket adding the
?nowprocket query to your URL (i.e:
http://www.yourdomain.com/?nowprocket) then you can identify the theme/plugin responsible:
rbtools.min.js from RevSlider plugin is the JS script which consumes the most CPU Time here.
How WP Rocket can help
Files that cannot be delayed will benefit from the
However, it is not a complete solution because deferred JS takes the same amount of time in the end to parse and execute, and PageSpeed will still recommend it.
What can I do then?
Concretely, to address this recommendation, you’ll have to remove some plugins scripts, some scripts from your theme and external scripts ... and WP Rocket cannot decide this or automate this for you.
You’ll perhaps have to reconsider the use of a slider at the top of your page and maybe replace it by a static image. Perhaps you’ll have to remove this social network widget from your sidebar that is calling a lot of third-party scripts (i.e: from another domain) you can find in this recommendation, this could really make a difference in terms of performance.
Here are also a few third party plugins that can help you remove slow JS from your pages. Please use them with care because it can break the functionality of your site and consult your developer if you need help.
And if you need custom development, we have partnered with Codeable, you can find more details about it here: https://wp-rocket.me/resources/codeable/