September 14th, 2007 at 12:08 am by David Potter

WP-PostViews - WordPress Plugin Review

It’s always nice to see how popular a post is when you’re visiting a blog. Maybe it’s my vanity, but especially like to see it on my own posts. This plugin makes it easy to add an indicator on a page or with a post to tell you how many non-registered members have viewed the post or page.

Lester Chan, aka GaMerZ, has produced quite a few plugins and he has a single page from which you can download all of them. He’s also provided a documentation page for each of his plugins as well as a forum. Bravo!

Overall Grade: A
Plugin Name: WP-PostViews
Version: 1.11
Plugin URI http://www.lesterchan.net/porfolio/programming.php
WordPress Plugin Page: http://wordpress.org/extend/plugins/wp-postviews/
Description: Enables you to display how many times a post/page had been viewed.  It will not count registered member views, but that can be changed easily.
Author: Lester ‘GaMerZ’ Chan
Author URI: http://lesterchan.net/
Documentation: http://lesterchan.net/wordpress/readme/wp-postviews.html
Forum: http://forums.lesterchan.net/index.php?board=16.0/
Installation

Installation is very simple.  Just copy the plugin to a folder called postviews and then activate it.

Usage

This plugin requires modifying your theme as it modifies the part of the web page that is theme specific.  In any page that does this:

<?php while (have_posts()) : the_post(); ?>

add this below it:

<?php if(function_exists('the_views')) { the_views(); } ?>

This will place text that looks like this at that place on the web page:

3 Views

To change the text, pass a string to the call to the_views, e.g.

the_views('readers')

The plugin also provides a couple functions to display the most viewed posts or pages.  Just for fun I added the following code to my test sidebar to display the first 20 characters of the top three posts on my blog and it looked pretty cool.

<?php if (function_exists('get_most_viewed')) { ?>
<li><h2>Most Viewed Posts</h2>
  <ul>
  <?php get_most_viewed('post', 3, 20); ?>
  </ul>
</li>
<?php } ?>

Room For Improvement

As simple as it is, there some things that could make this plugin more useful, and they all apply to the extra functions to display the most viewed posts or pages.

  • Provide a widget to display the most viewed posts or the most viewed posts in a category.
  • Allow the text displayed for # views on most viewed posts to be specified to the function.
  • Specify a title on the links so that title popups will be displayed when the user hovers the mouse over them.
  • Provide an admin page to display views for each post.  I’ve found that my blogs aren’t visited as often as I’d like and it just plain looks bad to see small numbers for the views.  This communicates that the posts aren’t very important and don’t need to be read - definitely not the impression I want to give :-)
Conclusion

This is a terrific plugin.  I plan on installing this on all my WordPress sites.

One Comment

  1. Comme une image · February 7th, 2008 at 8:31 am #

    I was looking for such a plugin (imho, that should’nt be a plugin but an inner WP feature) and found VC.
    Not a perfect plugin but it includes the admin function that you need.

Leave a Comment




XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>