A browser can’t paint a page until it has the CSS and it can’t finish parsing until the synchronous scripts are done. That’s the whole story of render blocking. A 300 KB stylesheet in the head can leave a visitor looking at nothing for a second, even on a fast connection.
The static build is a good place to see it. Every page is a file, and the head is right there. No database, no admin screens, no guessing which enqueues fired.
Find what’s in the head
Open a built page in the processed folder and read the top of it. You’re looking for stylesheets, scripts without defer or async, and inline blocks big enough to matter.
grep -n 'rel="stylesheet"' about/index.html
grep -n '<script[^>]*src=' about/index.html
grep -c 'rel="stylesheet"' home/index.html
Then compare pages. The home page might load six stylesheets because of a page builder; a post might load two. If the count changes per template, so does the blocking cost. The file list gives you the sizes; the HTML gives you the order.
WordPress builds the ID from the handle: contact-form-7-css for a stylesheet, contact-form-7-js for a script. That tells you which plugin or theme enqueued the file, and it’s the handle you need when you change it.
What blocks the first paint
- A stylesheet blocks rendering. The browser builds the CSS object model before first paint, because painting without it would flash unstyled content.
- A synchronous script blocks parsing. The browser stops, downloads, executes, then carries on with the rest of the document.
- A script after a stylesheet waits for the CSS too. Even a small script can be held up by a large stylesheet above it.
- An inline script blocks while it runs. A small consent stub is fine; a large inline data blob is not.
- A module script is deferred by default, so it doesn’t block parsing, but its imports can still delay the page becoming usable.
Preloads don’t block. They start a download earlier and compete for bandwidth, which is usually a win for a font or a hero image and a loss if you preload everything.
Critical CSS in practice
Critical CSS means inlining the rules needed for what’s visible before scrolling, then loading the rest without blocking. It works because first paint needs a small subset of the stylesheet, not all of it.
The costs are real. Inlined CSS can’t be cached across pages, so every page carries it. It has to be regenerated when the template changes. Get it wrong and you get a flash of unstyled content, or a layout that jumps as the full stylesheet arrives. It’s a build step, not a switch.
StaticScope doesn’t generate critical CSS. You can add it in the theme, or as a post-processing step on the built HTML. A post-processing step has one advantage: the files already exist and you can measure them. It also has one disadvantage: you now own a build tool that can break every page at once.
The conventional pattern loads the full stylesheet without blocking, with a fallback for browsers without JavaScript:
<link rel="preload" href="/wp-content/themes/site/style.css" as="style"
onload="this.onload=null;this.rel='stylesheet'">
<noscript><link rel="stylesheet" href="/wp-content/themes/site/style.css"></noscript>
That trades a blocking stylesheet for a page that renders without it and then re-renders. On a simple site it’s fine. On a complex one it can look worse than the delay. Test it on a slow connection before committing.
Defer and async
defer downloads in parallel and runs after parsing, in document order. It’s the right default for scripts that need the DOM or depend on each other. async runs as soon as it arrives, in whatever order that happens. It suits independent scripts such as analytics, not a script that expects jQuery to be there.
WordPress 6.3 and later accept a strategy when enqueuing:
wp_enqueue_script(
'site',
get_theme_file_uri( 'assets/site.js' ),
[],
'1.0',
[ 'in_footer' => true, 'strategy' => 'defer' ]
);
For a script someone else enqueued, use wp_script_add_data( 'handle', 'strategy', 'defer' ) on wp_enqueue_scripts at a late priority. Don’t defer jQuery unless you’ve checked the inline scripts that assume it exists at parse time. A deferred jQuery plus an eager inline jQuery(...) is a broken page with a green build report.
What a static build changes
A static host serves a file. There’s no PHP, no database and no plugin bootstrap, so the server response is as quick as the host makes it. That’s the biggest single improvement, and it happens before you touch a stylesheet.
StaticScope also removes some head clutter during preparation: links to WordPress endpoints such as the REST API, XML-RPC and oEmbed, the generator meta, and elements whose files aren’t in the site. So the static page usually has fewer requests than the live one.
It does not minify, combine or defer anything. If the theme enqueues seven stylesheets, the static site has seven stylesheets. If a plugin prints a blocking script in the head, the built page has a blocking script in the head. The build is a copy, not an optimiser.
What a static build makes possible is the extra pass. With the files on disk, you can generate critical CSS per template, strip rules that match nothing, hash assets and give them long cache lifetimes at the host. A dynamic site can do those tasks too, but it usually needs a plugin, a cache layer and more moving parts. Here you’re editing files that are about to be published. The trade-off is that every extra pass is another thing to maintain and another way to break a page.
A safe order to fix it
- Remove assets you don’t need. A blocking stylesheet you can delete is better than one you can defer.
- Defer non-critical scripts. Start with the ones that only add behaviour after load.
- Split CSS by template. If the theme loads everything everywhere, load the post stylesheet on posts and the landing stylesheet on landing pages.
- Inline critical CSS for the main templates. Only after the first three steps, and only with a way to regenerate it.
- Measure again. On the deployed host, with caching disabled in DevTools.
Most sites get most of the win from steps one and two. Critical CSS is the expensive step, and it’s the one people reach for first because it sounds clever.
Measure the paint, not the file
The build tells you what’s in the head. Only a browser tells you when something appeared. Run the preview or the deployed site through Lighthouse with throttling on, and look at the blocking time and the first contentful paint. Then change one thing and run it again.
Check the deployed site rather than the local preview when you can. The preview is served by WordPress’s web server; your host may add compression, HTTP/2 or HTTP/3, different cache headers and a CDN. Those change the timing more than a 20 KB stylesheet.
Don’t defer everything. Consent blocking, theme setup that sets a class before paint and scripts that other inline code depends on need to stay where they are. Defer is a tool, not a default.