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 concrete 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 occurred. 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 latency-tracker 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 latency-tracker 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 screen shots

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

Get the latest version from the Wordpress Plugins directory.


Filed under: Wordpress — Shaun Kester on October 9, 2008

Comments / Trackbacks

13 Responses to “Latency Tracker: PHP/mySQL tracking for Wordpress”

  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.

  8. Richard says:

    Excellent idea! for more developments you may want to take a look at http://tools.pingdom.com. Many thanks.

  9. Dan says:

    Thanks for this! Final nail in the coffin for Media Temple’s grid (gs), the king of latency.

  10. SeanJA says:

    I installed it on my blog, but I am getting this on the admin site:

    Error: this._each is not a function
    Line: 593

  11. Shaun Kester says:

    That’s odd, it’s only 341 lines long, so I’m not entirely sure what the problem could be. Is it coming from PHP or is it a Javascript error?

  12. SeanJA says:

    Ah, it is in the prototype library… guess I shall have to look elsewhere to figure it out?

    It is in: Prototype -> Enumerable

    Could be a conflict with jQuery or something I guess.

  13. Shaun Kester says:

    I tried to set it up so as to minimize collisions between the JS libraries in WP. I’ll take a look at this end and see if I can’t do more for that. Thanks for reporting the problem.

Leave a Reply