The Plugin Resource Profiler is a WordPress plugin that helps site administrators monitor the resource usage of active plugins. It offers a clear breakdown of:
Hook count per plugin
Number of PHP files and classes loaded
Detection of slow WordPress hooks (>50ms)
Log of slow hooks with plugin origin
Admin interface with sorting and filtering options
Displays the number of WordPress hooks registered by each plugin.
Useful to understand which plugin adds the most filters/actions.
Shows how many PHP files and classes each plugin loads.
Helps detect heavy plugins that may slow down performance.
Any hook that takes more than 50ms to process is logged, along with its name, execution time, and originating plugin.
Logs are stored in /wp-content/prp_log.log
Accessible via Admin > Plugin Profiler:
Plugins tab:
Overview table of all plugins
Sortable and filterable
Logs tab:
Shows slow hook events from the log
Also sortable and filterable
Includes delete log button
A quick link to the plugin settings is added in the WordPress plugins list.
add_action('all', ...)
)Tracks execution time between each hook and logs slow ones (>50ms):
add_action('all', function($hook_name) {
static $last_time = null;
$now = microtime(true);
if ($last_time !== null) {
$delta = $now - $last_time;
if ($delta > 0.05) {
// Find plugin source of the hook via debug_backtrace
// Log to prp_log.log with hook name, time, and plugin
}
}
$last_time = $now;
});
Two functions scan:
$wp_filter
to count unique hooks per plugin
get_included_files()
and get_declared_classes()
to count how many files/classes each plugin loads
prp_render_admin_page()
Renders the "Plugins" tab with a sortable and searchable table of all active plugins.
prp_render_log_page()
Reads the prp_log.log
file and displays each logged entry in a table.
Includes:
Filter search box
Sortable headers
Delete log functionality
A small JavaScript snippet is embedded to:
Enable click-to-sort per column (numeric or text)
Add a search field to filter rows live
Show ASC/DSC arrows for clarity
Identify plugins that slow down your WordPress site
Debug performance issues related to hooks
Analyze plugin bloat (too many files/classes/hooks)
Upload the plugin archive via Plugins > Add New > Upload Plugin
Activate the plugin
Go to Tools > Plugin Profiler to view performance data
Export CSV/PDF
Hook execution charts
REST API endpoint for performance stats
Integration with Query Monitor
Nicușor Gurău
WP Plugins URI: https://webmastertool.org/blog/category/wordpress
👉 Download Plugin Resource Profiler