Simple WordPress Stats Plugin to show variousÂ vitalÂ blog statistics to your visitors. Currently it can be used to show off the following stats of you WordPress site:
- Google Page Rank
- Alexa rank
- Technorati rank
- Feedburner Feed Count
- Twitter follower count
- Google plus one count
- Number of Blog Posts
If you don’t want the hassle of updating your “Advertise Here” page of your blog every few days with the important statistics then this plugin will come in handy.
You can also show the stats widgetÂ on your sidebar.
Blog Stats Plugin Screenshot
The plugin will show a widget/badge similar to the following:
Blog Stats Plugin Installation
- Unzip and Upload the folder â€˜wordpress-blog-vitalsâ€™ to the â€˜/wp-content/plugins/â€™ directory.
- Activate the plugin through the â€˜Pluginsâ€™ menu in WordPress.
- Go to Settings and configure the options eg. which stats you want to show off, caching time etc.
- Use the widget, trigger text or call the php function to show the stats.
Blog Stats Plugin Usage
There are three ways you can use this plugin:
1. Add the following shortcode to a post or page to show the stats
2. Use the following function from a template (.php) file
3. Use the ‘WP Blog Vitals’ widget from the widgets menu
Blog Stats Plugin Settings
Here is a screenshot of the settings menu showing you what you can configure.
The following php functions can be used to display/retrieve specific stats:
- <?php echo vitals_getpagerank(URL); ?> – Displays the Google page rank of the URL specified.
- <?php echo vitals_get_cached_alexa_rank(URL); ?> – Displays the Alexa rank of the URL specified.
- <?php echo vitals_get_cached_technorati_rank(URL); ?> – Displays the Technorati rank of the URL specified.
- <?php echo vitals_get_cached_post_count(); ?> – Displays the total number of blog posts.
- <?php echo vitals_get_cached_comments_count(); ?> – Displays the total number of blog comments.
- <?php echo vitals_get_cached_pingbacks_count(); ?> – Displays the total number of trackbacks.
- <?php echo vitals_get_cached_twitter_count(“twitter_username”); ?>Â – Displays the total number of Twitter follower count.
Replace ‘URL’ with the actual URL of the site. For example, to show the Alexa Rank of tips and tricks HQ site I would use the following code in my .php (template) files:
The cached version of the function is used rather than the live one to improve page load time.
Getting Google API Key
You can retrieve your Google API key from the Google API console of your Google account. Enable the google plus API from the “services” menu. The API key can be found under the “API Access” menu.
Donation option can be found on my projects page.
Download Latest Version (v1.8)
Download the WordPress Blog Vitals plugin.
I will be updating this plugin over the next few months and add more stats and other options. Feel free to leave your suggestions in the comment area below and don’t forget to subscribe to stay upto date.
Checkout the list of best WordPress plugins to find out what other plugins you should be using.