This plugin hasn’t been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

WP Plugin Stats

Description

This plugin is made for WP plugin developers. It parses plugin stats page and can show download stats (today, yesterday, last week, total, as well as flash chart) in your WordPress page/post. Just place one of the following bbcodes in your page and it’ll get appropriate data: [today=plugin-name-slug] [yesterday=plugin-name-slug] [lastweek=plugin-name-slug] [total=plugin-name-slug] [stats=plugin-name-slug] or [chart=plugin-name-slug]

This plugin is using AJAX to get plugin stats (all but charts), but it can’t get two datums simultaneously so be careful not to use two bbcodes on same page ’cause it’ll get funny results or it’ll not get them at all. If you have two or more posts on your home page (as usually we do have), and these bbcode tags in them, that also counts as two (or more) bbcode tags on one page, so my personal suggestion is to use these on plugins’ WP powered pages, not in posts.

If ajax function can not be started (js code not loaded from external file) you’ll get a plus sign (which can be changed by replacing click.gif in plugin’s directory) and you need to click on it to get data.

Screenshots

  • Plugin stats chart
  • Plugin stats ([stats] tag)

Installation

  1. Upload contents of wp-plugin-stats.zip to /wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. Enjoy your new plugin

FAQ

Which bbcode tag I need to use for… ?

This plugin supports six different tags to show six different types of data.

  1. Today’s downloads

To show how many times your plugin has been downloaded today, just place [today=plugin-name-slug]. For example: “My plugin has been downloaded [today=wp-plugin-stats] times today.”

  1. Yesterday’s downloads

To show how many times your plugin has been downloaded yesterday, just place [yesterday=plugin-name-slug].

  1. Last week’s downloads

To show how many times your plugin has been downloaded last week, just place [lastweek=plugin-name-slug].

  1. Total downloads

To show how many times your plugin has been downloaded since it is hosted on WordPress.org, just place [total=plugin-name-slug].

  1. All downloads

To show all data of above at once, just place [stats=plugin-name-slug].

  1. Download chart

To show Flash download chart which is displayed on your plugin’s stats page, just place [chart=plugin-name-slug]

How to change dimensions of Flash chart?

In short: you can’t. You can resize flash applet, but chart will be cropped then, so I haven’t introduced possibility to change dimensions of flash chart. Default dimensions are 540×400 px

How to disable automatic getting of data?

To disable automatic getting of data and force users to click on plus sign (click.gif) find and open file wp-content/plugins/wp-plugin-stats/wp-plugin-stats.php and look for string <script type='text/javascript'> window.onload=function(){. Replace that with this: <script type='text/javascript'> //window.onload=function(){ and that’s it. From now on, a plus sign (click.gif) will be always be shown and data will be fetched only when user clicks on that.

How to change template of [stats] bbcode tag?

Go to Options -> Plugin Stats and change template in large text box. Following keywords will be replaced with actual data:

  • %today% – will be replaced with number of today’s downloads
  • %yesterday% – will be replaced with number of yesterday’s downloads
  • %lastweek% – will be replaced with number of last week’s downloads
  • %total% – will be replaced with total number of downloads
Can I change styles of results?

Yes, you can style results with css styles. All styles are already placed in file wp-content/plugins/wp-plugin-stats/wp-plugin-stats.css and styles that apply to this plugin are:

  • .wpstats_all – class of results’ DIV tag, used for [stats] bbcode
  • .wpstats_loading – class of results’ SPAN tag, used for all bbcodes (except [chart]), applied when load.gif image is shown
  • .wpstats_result – class of results’ SPAN tag, used for all bbcodes (except [chart] and [stats]), applied when results are fetched from WordPress.org
My plugin won’t get data, but it displays chart well…?

Make sure that “Allow URL fopen” on your server is enabled. You can’t enable this manually if it is disabled, you’ll need to contact your webhost provider. Charts are directly embeded in page while other data is fetched from WordPress.org

Contributors & Developers

“WP Plugin Stats” is open source software. The following people have contributed to this plugin.

Contributors

Translate “WP Plugin Stats” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.