Disclaimer: This plugin is geared towards developers with plugins in the WordPress.org repository and anyone else that wants to easily display information about a plugin that is in the repository. Don’t fit this criteria? Then this plugin will probably not be of much use to you.
This plugin was designed to be as simple as possible, while still being very powerful. There is no settings page, just one shortcode and TinyMCE shortcode interface to help you generate codes with ease. You can display stats from a single plugin, or aggregate stats from multiple plugins. Check out the video below for a quick overview.
The easiest way is to click the new plugin stat icon that is added to the top bar of your WordPress editor (Check out the screenshots below). It looks like the standard WordPress plugin icon. This will launch a popup window where you can then choose your settings and enter in the desired plugin slug(s). Click insert, and the generated shortcode will be added to your editor’s content field.
If you don’t want to bother with the popup window, or what to use the shortcode outside the editor, you can manually type out the shortcode. Below is the base shortcode structure with defaults. Technically,
slug is the only required field. If you just enter your plugin’s slug, the shortcode will display the number of active installs and cache the data for 43200 seconds (i.e. 12 hours).
Optional. The type of stat you with to display, either a stat from a single plugin or an aggregate stat generated from multiple plugins. Accepts
aggregate. Defaults to
Required. This is the plugin slug which can be retrieved from the plugin url on WordPress.org. For example, this plugin’s slug is easy-plugin-stats. Accepts any valid plugin slug for
single, or any number of space-separated plugin slugs when using
aggregate. Defaults to null.
Optional. The name of the field you have chosen to display. Accepts any of the following field. Defaults to
The available stat fields for
author_profile(Author Profile Link)
rating(Rating out of 100)
five_rating(Rating out of 5)
num_ratings(Number of Reviews)
homepage(Plugin Homepage Link)
The available stat fields for
Optional. The shortcode requests your plugin’s stats from WordPress.org. To limit the number of requests made, response data is cached. This optional setting allows you to adjust the cache time as you see fit. Accepts any positive integer (representing seconds) greater than 5. Defaults to
43200 (i.e. 12 hours).
Optional. Optional HTML to be printed before the field’s output. Accepts any valid HTML, but note that all double quotes will be replaced with single quotes to adhere to required shortcode markup. Defaults to null.
Optional. Optional HTML to be printed after the field’s output. Accepts any valid HTML, but note that all double quotes will be replaced with single quotes to adhere to required shortcode markup. Defaults to null.
This entire page is actually a demo for single stats. The stats in the sidebar, the tagline description at the top of the page, the installation instructions and changelog are all generated using the plugin. Here is the markup:
Currently, there are only two aggregate options available:
downloaded. A good example of an aggregate stat is on the homepage of this website where I display the total active installs and times downloaded of all my plugins on WordPress.org. The only real difference between the shortcode markup for aggregate and single stats is the inclusion of
…WordPress community. My code is currently running on 35,000+ websites and has been downloaded 291,279 times…
- You have a couple options:
- Go to Plugins->Add New and search for “Easy Plugin Stats”. Once found, click “Install”.
- Download the folder from WordPress.org and zip the folder. Then upload via Plugins->Add New->Upload.
- Activate the plugin through the ‘Plugins’ menu in WordPress.
- From the ‘Plugins’ page, head to a post/page and check out the new button in your editor.
- If you have any implementation questions, please post in the plugin support forum.
Do you need additional help with Easy Plugin Stats? Head on over to the plugin support forums on WordPress.org. I monitor the forums constantly and it is likely that there are others with your same question. Keeping all questions and answers over there will help everyone. If you contact me directly through this website about Easy Plugin Stats, I will just kindly direct you over to WordPress.org 😉.
- Initial Release