Latency Tracker: PHP/mySQL tracking for Wordpress

Overview

I’ve had some forum peeps complain lately that the speed of their Wordpress install seems fast one day, slow the next, and mediocre the next. To give them some concerete data, I created the LatencyTracker plugin for Wordpress. This really simple plugin hooks into your wp_footer function (so make sure that your theme uses it) to count the number of queries, how long they took, and when it all occured. That way, they can show some solid data to the host so that they are able to compare numbers and know for sure that their load times are faster or slower when compared.

Install

  1. Download the zip at the bottom of this post and extract somewhere memorable on your storage device.
  2. Upload the latencytracker folder to your wp-content/plugins/ folder.
  3. Log in to your Wordpress dashboard and go to the plugins page.
  4. Activate the plugin

Uninstall

  1. Log in to your Wordpress dashboard and go to the plugins page.
  2. Deactivate the plugin. This will remove the table storing your data and remove the option info from your wp_options table.
  3. Delete the latencytracker folder in your wp-content/plugins/ folder

FAQ

  • Which versions of Wordpress have you tested it with?
    Wordpress 2.6+, 2.7+
  • Will it work with my theme?
    It should. Make sure that you footer.php in your theme folder includes a call to wp_footer(); or it won’t work.
  • This is stupid, it just stores data to a table and causes my site to slow down!
    Sorry, it is my first WP plugin, and I’m trying to fill a very specific need, track PHP/mySQL response times.
  • My friends site is faster/slower then mine!
    Each host is different. Mirror your site on another server for apples to apples comparison of the data.

Admin panel screenshots

Recent requests with Table Sorter

Recent requests with Table Sorter

Graph of processing times with Fusion Charts

Graph of processing times with Fusion Charts

Data average

Data average

Download

7 Comments

  1. Toby says:

    Thanks for the great plugin!

  2. [...] I’ve updated my Wordpress PHP/mySQL Latency tracker to version 1.3. I wanted the admin to be able to see min, max, and avg times for the number of queries and processing time. I also wanted them to be able to view the last 50 requests. You can access the admin panel under Manage >> Latency Tracker. You can get the updated version on the plugin page. [...]

  3. [...] the latest version on the plugin page. [...]

  4. [...] my Latency Tracker plugin and make it ready for release as a formal Wordpress [...]

  5. [...] updated my Latency Tracker plugin for Wordpress to version 2.0.In case you haven’t seen it before, here is a short blurb about it. The [...]

  6. Robert says:

    This is very good – works great on my wordpress installs but I use another mysql program called website baker as well as other mysql based applications. Could this be made into a stand alone program with appropriate calls installed on the footer of the program you wish to monitor? If so this would be great. I think it would gain wide appeal, many people would like the opportunity to monitor the performance of their mysql based applications across different hosting environments. Thanks

  7. Shaun Kester says:

    @Robert: I guess it could be, it’s not that hard to do. Take a look at the source and it should be pretty easy to port.

Leave a Reply