Performance: Removing hooks
MEDIUM IMPACT
This affects how quickly WordPress processes actions and filters during page load and interaction.
<?php remove_action('wp_head', 'heavy_function'); ?>
<?php function heavy_function() { /* heavy processing */ } add_action('wp_head', 'heavy_function'); ?>| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Keeping heavy hooks active | No direct DOM changes | 0 | 0 | [X] Bad |
| Removing heavy hooks | No direct DOM changes | 0 | 0 | [OK] Good |