Chip's Quips
A tiny spark of wit for a highly flammable world

Count on TD for a useful WordPress plugin

July 26th, 2006 4:45:23 pm pst by Sterling Camden

Out on her first date, and the girl can dance. I’m cutting the rug with TDavid’s new WordPress plugin, TD Word Count, version 0.3. This plugin is similar to one I was already using, Word Stats, but different.

As you would expect, the installation for TD is easy. Just upload the tdwordcount.php file into the wp-content/plugins directory, then go into Dashboard/Plugins and activate it. Modify or add a post to generate/update the numbers, and you’re good to go.

I was a little bit surprised to find that this plugin adds its admin menu under “Dashboard”, but it makes sense, since the page so accessed doesn’t offer you any “Options” other than how to view the stats. The WordPress Codex provides some pretty clear guidelines on where administration menus should go, but a lot of plugin authors ignore these guidelines, or their pages don’t fit neatly into one of these categories, which results in having plugin pages littered about the interface. TDavid confused me by doing what he was supposed to. But here’s what the page looks like, freshly ripped from the screen:

tdwordcount

wordstatsA quick comparison with the output from the Word Stats plugin (neatly snipped from my sidebar on the right): WS came up with the same word count as the “published” count from TD, but included the “unpublished” posts in the total number of posts. Both plugins compute the average words per post using the aggregate of published and unpublished words and posts, but even so they’re off by one. That’s because the computed value is 213.899, which TD does not round up to 214.

WS provides interesting information about the number of days that have elapsed from first post and last post. It also offers some other stats I haven’t included in my sidebar widget. But it doesn’t give you some of the information that TD does: number of posts over 300 words, maximum word count for any one post, and a detailed list of the posts, sorted by word count, title, or post ID (which orders by the date you first created a post).

I was curious to find out why I had 5 “unpublished” posts according to TD, when I know that right now I have nothing that’s not available publicly. It turns out that TD counts static pages, like my About page, as unpublished. It also found one attachment page I didn’t know I had. Overall, I think TD provides better, more detailed information than WS.

TD does not, however, provide any way (that I could find) to publish this information on your blog. I’d like to see some of the same options that Word Stats provides here. WS has special tags you can insert in a post or page to output stats, and it also provides a built-in sidebar widget. Maybe that’s coming from TD in version 0.4, eh? The widget API is pretty easy compared to the manifold actions and hooks of the full plugin API, but if TDavid would like any help with creating a widget, he knows where to find me.

TD Word Count does not require much documentation, but TDavid has provided both a brief readme.txt file and a detailed screencast in which he reviews the operation of the plugin. If you can’t operate it with that kind of visual and verbal support, someone needs to take away your keyboard. Should TD add options for publishing the data in a future revision, I would like to see that information included in the readme.txt file for easy reference.

A quick scan of the source shows the code to be pretty readable and organized. You’d expect that from someone who’s been coding PHP for as long as TDavid apparently has. 1999? I hadn’t even heard of PHP back then.

OK, TDavid, I’ve brought her back home — maybe a little less innocent than before, but we had a good time. I’ll dance with this one again.

Posted in Blog Blog, Geek Meditations | 5 Comments » RSS 2.0 | Sphere it!

RSS feed | Trackback URI

5 Comments »

MyAvatars 0.2
Comment by TDavid Subscribed to comments via email

Wow, thanks for the detailed review and so quickly too! :)

Nope, you didn’t miss any feature to include the word count stats into a public page (yet). It’s strictly a For Blogger’s Eyes Only deal in v0.3.

Did you try navigating around with your browser find on the titles? I found I’ve been using that to find archived posts by title. It’s faster and more convenient than using the search. Of course you do have to remember keywords in the title.

And good job spotting the pages classification. It’s on the list to break out and identify pages separately. I haven’t really used pages that much in WP to date, so I’m learning about how they are laid out and am going to start using them more.

It’s been fun learning about these WP plugins work and sharing my first plugin with the world. There will be upgrades to this plugin. And other, different plugins.

 
MyAvatars 0.2
Comment by sterling Subscribed to comments via email

Yes, TDavid, your list of the posts is the most concise index of titles available (all on one page). Nice side-benefit. Good work, and looking forward to more!

 
MyAvatars 0.2
Comment by Fred

Just so you know, the latest versions of Word Stats include info about the longest and shortest posts.

 
MyAvatars 0.2
Comment by sterling Subscribed to comments via email

Thanks for the heads up, Fred. I’ll give it a look.

 
MyAvatars 0.2

[...] I’ve seen has come from a fellow developer and friend Sterling “Chip” Camden at Chips Quips. Not sure if he’s kept up with the newer versions of TD Word Count or not, but when I just [...]

 
Name (required)
E-mail (required - never shown publicly)
URI
Your Comment (smaller size | larger size)
You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> in your comment.

Subscribe without commenting

Better Tag Cloud