Skip to content

Instantly share code, notes, and snippets.

View brampta's full-sized avatar

Pierre V. Larivière brampta

View GitHub Profile
@brampta
brampta / Wordpress slow hooks timer
Last active September 20, 2022 18:02 — forked from Viper007Bond/whatissoslow.php
WordPress: Times how long it takes each filter and action to run and displays results at the end of the page. Quick and dirty.
<?php
//add this in your theme's functions.php to time all the hooks
// Here's a test to make sure it's working
//add_action( 'wp_footer', function() { sleep( 2 ); } );
class WhatIsSoSlow {