[update] This plugin is no longer maintained by the author and breaks recent WordPress versions.
When you tinker with ready-made engine such as WordPress it is often unobvious what is going on inside. Seemingly simple actions can call cascades of functions and database queries under the surface.
WP Tuner is a plugin for developers and power users that allows to precisely monitor how page is generated and resources are consumed.
What it does
Plugin attaches itself to WordPress page generation cycle and logs:
- time spent;
- CPU load (if on Linux server);
- database queries;
- memory usage.
Results are displayed at the bottom of each page, visible only to logged in administrators. Performance bottlenecks (events that take longer than threshold, specified in settings) are automatically highlighted.
Add own markers
Markers in result table show statistics up to next marker. Meaning there can be plenty of stuff running in between default checkpoints.
Most important feature is that WP Tuner supports additional markers. They can be added to WordPress actions:
add_action(‘action', 'wpTuneFilterTime' );
or at any point in code:
if (function_exists(wpTuneMarkTime)) wpTuneMarkTime('mark');
Strong features
Collected data is organized in several highly useful tables (which are shown can be selected in options):
- page generation – shows how page is generated from mark to mark and how resources and time are distributed;
- database performance – shows which files (WP core, current theme, plugins, etc) make database calls, how many and how fast;
- database tables – shows which WP tables get queried;
- query analysis – shows how specific queries work and consume resources.
Downsides
Aside from some minor usability issues (style sheet could be more bulletproof) my only gripe so far that it is hard to distinguish between multiply loops in page. Page generation info could use file and line numbers where marks are fired, which is technically possible.
At moment plugin isn’t actively developed, but author stated he is going to continue work on it in the future.
Overall
Excellent and unique tool to make sense of WordPress performance. Useful in many scenarios – from profiling sluggish blog to writing efficient code.
Home http://blogs.icta.net/plugins/category/plugins/wp-tuner-plugins/
Repository http://wordpress.org/extend/plugins/wptuner/
Optimizing Freeware Genius blog performance | Rarst.net #
Patrick Moran #
Rarst #
Ashish #
Rarst #