Why it matters
Third-party scripts often execute long tasks that block the main thread, destroying INP and TBT scores.
How to fix it in WordPress
- Identify the heaviest third-party scripts (e.g., chat widgets, trackers).
- Use your performance plugin to 'Delay JavaScript execution' until user interaction.
- Alternatively, host the scripts locally if your plugin supports it.
Plugin-specific steps
Already using one of these plugins? Follow the exact steps for your setup.
WP Rocket
- 1Go to Settings → WP Rocket → File Optimization.
- 2Check 'Delay JavaScript execution'.
- 3This solves almost all third-party script blocking issues automatically.
Perfmatters
- 1Go to Settings → Perfmatters → Assets.
- 2Enable 'Delay Javascript'.
- 3Choose 'Delay All' or add specific third-party URLs to the delay list.
- 4If using Google Analytics, enable 'Local Analytics' under the Analytics tab.
How to verify the fix
- Check PageSpeed Insights. The third-party code warning should disappear.
- Load the page, wait 3 seconds, then move your mouse. The chat widget or analytics should pop in only after you move.