The short fix
- Test the page with phone settings and list the scripts that use the most CPU time.
- Deactivate plugins, widgets and tracking tags whose feature nobody uses.
- Unload the remaining plugin files on pages that don't need them, for example a form plugin everywhere except the contact page.
- Delay chat, social widgets and marketing tags until the first tap or scroll; keep the menu, filters, variation picker, add-to-cart and the cookie banner out of the delay.
- Re-test 2–3 times, then shop the site on a phone to make sure every button still works.
What PageSpeed Insights is telling you
PageSpeed Insights lists Minimize main-thread work under Diagnostics. It shows how many seconds the browser's main thread was busy while the page loaded, split into categories: script evaluation, style and layout, rendering, parsing HTML and CSS, script parsing and compilation, and garbage collection. Lighthouse flags the page when that work passes 4 seconds.
The main thread is the single lane where the browser parses HTML, applies CSS, runs JavaScript and handles taps. While it is busy, the page can't respond.
Two sibling diagnostics show the same problem from other angles. Reduce JavaScript execution time lists each script with its Total CPU Time; it warns above 2 seconds of JavaScript work and fails above 3.5 seconds. Avoid long main-thread tasks lists the longest single blocks of work.
In a FlashMax report this is the card The phone is busy running scripts. It appears when scripts block taps for more than 200 ms while the page loads. Diagnostics don't change the score by themselves: the score comes from five metrics, and the one this work drives is Total Blocking Time.
Why it slows the page
Any task that keeps the main thread busy for more than 50 ms is a long task. Lighthouse adds up the part of every long task beyond 50 ms, from First Contentful Paint onward, and calls the total Total Blocking Time (TBT). One 250 ms task adds 200 ms of blocking time.
TBT carries 30% of the Lighthouse performance score, more than any other metric. web.dev asks for less than 200 ms when testing on average mobile hardware.
TBT is also the lab stand-in for Interaction to Next Paint (INP), the Core Web Vital that measures how fast real visitors' taps and clicks get a response (good is 200 ms or less). Lighthouse can't measure INP because nobody taps during the test. Cutting TBT often improves INP, but only field data can confirm it.
For a shop, the visible cost is a menu, filter or "Add to cart" button that doesn't react to the first tap.
How common it is
In our study of 40,951 WooCommerce store home pages (Lighthouse 13, phone settings, 30 Oct – 26 Nov 2026), 63.5% of stores (25,996) got this card. Their median phone score was 44, against 63 for stores without it. That gap is a correlation, not proof: a store that runs too many scripts usually has other problems too.
It is above all a phone problem. The median store blocked the main thread for 328 ms on the phone test and for 2 ms on the computer test, because the phone test simulates a mid-range phone on a slow 4G connection. Method and caveats are in the WooCommerce speed study.
How to find the scripts behind it
- Run a free test. The FlashMax speed test lists the files behind the card. The path tells you the owner:
/wp-content/plugins/plugin-name/is a plugin,/wp-content/themes/is your theme, another domain is a third party. - Open the JavaScript table in PageSpeed Insights. Expand Reduce JavaScript execution time and look at Total CPU Time. Script Evaluation is the time the code spends running; Script Parse is the cost of reading it.
- Record a trace in Chrome DevTools. In the Performance panel, turn on CPU throttling in the capture settings and record a reload. Long tasks carry a red triangle, with the part over 50 ms shaded red; click one to see which script ran.
Test a category page and a product page too, not only the home page.
How to fix it on WordPress and WooCommerce
1. Remove before you optimize
Plugins with a front-end feature can add scripts to every page: sliders, pop-ups, social feeds, wishlist buttons, "someone just bought" notices, a second analytics tool. Deactivate the ones nobody uses, on a staging copy first. Removing code is the only fix that also saves the work it would do after a tap.
2. Load plugin files only where they are used
Many plugins load their files on every page even when the feature lives on one. Asset CleanUp: Page Speed Booster (free on wordpress.org) shows the CSS and JavaScript each page loads and lets you unload files per page, per post type or site-wide. Switch on its Test Mode first: your rules then apply only to you as a logged-in administrator until you have checked the page.
3. Delay non-essential scripts until the visitor interacts
Delay holds chosen scripts until the first mouse move, scroll, tap or key press. Chat, social embeds, review pop-ups and most marketing tags are good candidates:
- WP Rocket: File Optimization tab, Delay JavaScript execution. Use One-click exclusions for known plugins and the Excluded JavaScript Files box for anything else. It works on cached pages only.
- Perfmatters: JavaScript menu, Delay JavaScript, with the choice of Only delay specified scripts or Delay all scripts, plus Quick JS Exclusions and an optional timeout.
- LiteSpeed Cache: Page Optimization, JS Settings, set Load JS Deferred to Delayed. Exclusions go in JS Deferred/Delayed Excludes on the Tuning tab.
Delay doesn't delete work, it moves it to the first interaction. A Lighthouse test doesn't tap the page, so the lab score can jump while a real shopper's first tap gets slower. Shopify's theme guide draws the line: delaying a chat widget until interaction is a real improvement, while delaying the theme's own variant selector moves the metric and makes the page worse. Keep out of the delay whatever a shopper uses first: mobile menu, search, filters, variation picker, add-to-cart, mini cart and the cookie banner (a delayed banner can't appear until the visitor interacts).
4. WooCommerce specifics
- Cart fragments. Since WooCommerce 7.8 the cart fragments script loads only where the classic Cart widget appears, but some themes hard-code that widget into the header, so it can still run on every page. WooCommerce recommends the Mini-Cart block, which doesn't use cart fragments.
- Page builders. Hundreds of nested sections also make style and layout work heavier; see Optimize DOM size.
- Code that never runs. If PageSpeed Insights also shows Reduce unused JavaScript, read that guide next.
Shopify and hand-built sites
Shopify. You can't change the platform's own scripts, but apps and tracking tags are usually most of the work you control: remove the ones you don't use and check the rest with Reduce third-party code. Be wary of "speed" apps and freelance speed-optimization services: Shopify warns that some serve testing tools a stripped-down page while shoppers get the original one.
Hand-built sites and custom themes. Load scripts with defer, and split long jobs so the browser can handle input between the pieces. This helper from web.dev yields to the main thread with scheduler.yield() where available and falls back to setTimeout:
function yieldToMain() {
if (globalThis.scheduler?.yield) {
return scheduler.yield();
}
return new Promise(resolve => {
setTimeout(resolve, 0);
});
}
async function runJobs(jobs) {
for (const job of jobs) {
job();
await yieldToMain();
}
}
Each await ends the current task, so a tap that arrives in between is handled before the next job starts.
Mistakes to avoid
- Delaying everything. "Delay all scripts" with no exclusions can leave a hamburger menu, product filter or form dead until a second tap. Perfmatters' own docs mention mobile menus that need an exclusion.
- Combining and delaying at once. WP Rocket switches off its own JavaScript combining while delay is on, and Perfmatters asks you to turn off combining in other plugins.
- Testing while logged in. Delay works on cached pages, and caching plugins often skip logged-in users. Test in a private window, logged out.
- Forgetting the reports. Delayed analytics can show slightly lower visit counts. Tell whoever reads them before you switch it on.
How to check the fix worked
- Clear the plugin and CDN cache, then re-test the same page with FlashMax or PageSpeed Insights two or three times. Lab results vary, so compare the typical run, not the best one.
- Look at Total Blocking Time and at Total CPU Time in Reduce JavaScript execution time, not only at the score.
- Shop the site on a real phone: open the menu, filter a category, pick a variation, add to cart, open the cart, accept and reject cookies, reach checkout.
- Watch field data. INP from real Chrome users appears at the top of PageSpeed Insights and in the Core Web Vitals report in Search Console. Both cover the last 28 days, so a fix needs about four weeks to show in full.
Questions people ask
What does “Minimize main-thread work” mean?
The browser has one main thread that parses the HTML, applies the CSS, runs JavaScript and responds to taps. The warning means it was busy for more than 4 seconds while the page loaded.
Is it the same as “Reduce JavaScript execution time”?
They overlap. Minimize main-thread work counts all main-thread work, including style, layout and rendering; Reduce JavaScript execution time counts only scripts and lists them file by file. Fixing heavy scripts usually improves both.
Can delaying JavaScript break my store?
Yes, if the wrong scripts are delayed. Anything whose script must run before the first tap can break: a mobile menu, product filter, form, slider or cookie banner. Exclude those scripts, then test every button a shopper uses before you leave the setting on.
How do I find which plugin causes it?
Look at the file paths in the test report or in the Reduce JavaScript execution time table: /wp-content/plugins/ followed by a folder name points to that plugin. Deactivate it on a staging copy and re-test to confirm.
Sources
- Minimize main thread work (Chrome for Developers)
- Reduce JavaScript execution time (Chrome for Developers)
- Total Blocking Time (TBT) (web.dev)
- Optimize long tasks (web.dev)
- Delay JavaScript execution (WP Rocket docs)
- How to delay JavaScript until user interaction in WordPress (Perfmatters docs)
- Page Optimization (LiteSpeed Cache for WordPress docs)
- Asset CleanUp: Page Speed Booster (WordPress.org)
- Best practices for the use of the “cart fragments” API (WooCommerce Developer Blog)
- Identify and remove fake performance apps (Shopify)
Rather have it done?
The FlashMax team fixes the issues in your report, on a copy first, and shows the before-and-after.
See the speed optimization service