Performance: Site identity and branding
MEDIUM IMPACT
This affects the initial page load speed and visual stability by controlling how site logos, titles, and icons load and render.
<?php if (has_custom_logo()) { the_custom_logo(); } ?><h1><?php bloginfo('name'); ?></h1><!-- Use optimized logo with width and height attributes -->
<?php if (has_custom_logo()) { the_custom_logo(); } ?><h1><?php bloginfo('name'); ?></h1>
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Unoptimized logo without size attributes | Minimal | Multiple reflows on image load | High paint cost due to resizing | [X] Bad |
| Optimized logo with width/height and lazy loading | Minimal | Single reflow | Low paint cost | [OK] Good |