Performance: Why themes control presentation
MEDIUM IMPACT
This affects how quickly the page styles and layout appear to the user, impacting the initial load and visual stability.
<?php
// Enqueue external CSS file properly
wp_enqueue_style('theme-style', get_stylesheet_uri());<?php // Inline styles and heavy CSS in header ?><style>body {background: url('large-image.jpg');} .menu {font-size: 20px;}</style>
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Inline heavy CSS in theme header | Low | Multiple during load | High due to blocking | [X] Bad |
| Properly enqueued external CSS | Low | Single or none | Low and cached | [OK] Good |