Title: [Plugin: WordPress.com Stats] Potential Performance improvement
Last modified: August 20, 2016

---

# [Plugin: WordPress.com Stats] Potential Performance improvement

 *  [jose.sg](https://wordpress.org/support/users/josesg/)
 * (@josesg)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/plugin-wordpresscom-stats-potential-performance-improvement/)
 * I’m in the process of making performance improvements to our WordPress installation,
   and this plugin appears to balloon the number of performed queries per page.
 * On a single home page load, it appears to perform a query for each statistic 
   being tracked. For us that means 82 extra queries per page load, none of which
   are done via ajax. While I haven’t tracked down what is doing this, it’s likely
   a simple loop that is retrieving every possible option for the plugin.
 * This could be replaced with a single query like so:
 * `SELECT blog_id, option_id, option_name, option_value, autoload FROM options 
   WHERE option_name LIKE 'wpsd_%'`
 * In the constructor of whatever class – there is an entry point for the stats 
   plugin, right? – requires these options. If you REALLY want to, you could do `
   wpsd_option_%` instead, which would restrict it to just the options for the plugin.
 * I’ve disabled the plugin in the meantime, and this might be a localized issue,
   but just wanted to throw this out there so others were aware/can fix the issue.
 * [http://wordpress.org/extend/plugins/stats/](http://wordpress.org/extend/plugins/stats/)

The topic ‘[Plugin: WordPress.com Stats] Potential Performance improvement’ is closed
to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/stats.svg)
 * [WordPress.com Stats](https://wordpress.org/plugins/stats/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/stats/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/stats/)
 * [Active Topics](https://wordpress.org/support/plugin/stats/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/stats/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/stats/reviews/)

## Tags

 * [Stats](https://wordpress.org/support/topic-tag/stats/)

 * 0 replies
 * 1 participant
 * Last reply from: [jose.sg](https://wordpress.org/support/users/josesg/)
 * Last activity: [14 years, 8 months ago](https://wordpress.org/support/topic/plugin-wordpresscom-stats-potential-performance-improvement/)
 * Status: not resolved