Word Statistics plugin for WordPress
I’ve created a plugin called Word Statistics for WordPress 1.2 2.0 that displays readability statistics on the post editing screen whenever a post is edited or saved (and you continue editing). The plugin also provides similar functionality to the MovableType plugin MTWordStats. I’ve never used MT or tried the MTWordStats plugin so I can’t really say how the two compare.
Update 12/30/2005: A new version has just been released that is compatible with Wordpress 2.0. The older version is still available and works with versions prior to 2.0.
Does it play nicely with 1.3x?
I’m using it with 1.3-alpha-4 right now.
It also works nicely with 1.5.
Hi, I was interested in your plugin, but I can’t seem to download it correctly – the zip file appears to be damaged according to both WinZip and WinRar. I tried multiple downloads on different browsers and never got it correctly. Are you still hosting this?
It should be working now. Something has been corrupting files at my web host… it may be time for me to switch. Thanks.
Thanks for fixing that up. I’ve installed and it works great. Thanks for the plug-in. :)
I’ve read readability statistics software on your net.it is good.but how can I get this readability statistics software .tell me ,please.thank u!~
giovanni, follow the link in the post, above, to download it.
Very cool plug-in. Would it be possible to expose the variables holding the readability scores as a template variable? I’d love to be able to put the Fog Index inline with my posts.
Can you point out some internationalization efforts of Fog Kincaid Flesh? I’m experimenting with your plugin in an Italian language blog, but I guess their indexes are out of synch when dealing with a non-english text
The algorithms make assumptions about the difficulty of reading by counting the number of syllables in a word and the number of words in a sentence. I don’t know if those theories hold for languages other than English. Every language probably needs its own algorithm for breaking a word into syllables. Or you could change the algorithm to use a dictionary with syllable data.
I found two Italian readability indexes, Flesch-Vacca and GULPEASE. I’ll check if those need its own hyphenation rules. I’d like to localize this plugin, for now it’s on my august perhaps/maybe list.
Does the plugin ignore HTML tags?
Yes. It uses the PHP strip_tags() function.
Hi, I’m using the current version of WordPress 1.5.1.3 and I can’t seem to get your plugin to work. I was wondering if it does indeed work with this version, and if so, was there anything else I needed to do to install this plugin except for activating it? I’m totally confused, any help would be greatly appreciated. Thanks in advance -Justin
It works with WP 1.5.1.3. Make sure you have javascript enabled (check if quicktags are active in the Write page) and follow the installation instructions literally:
Hiyas, sorry I didn’t get back to you sooner, but I had a few issues with my blogger that needed to be squashed, heh. Anywho, I’ve done as you’ve said and it has been activated without any errors. When I write a post, I don’t see the extra line underneath the quicktags. However, when I attempt to edit a comment, I see them there. Is that where they’re supposed to be or…am I just really bad at this? Haha (which is probably the case)
Hey,
I’m a big fan of this plug in. I just upgraded to Wordpress 2.0. The plugin mostly works, all the template commands still work like a charm.
Due to the vastly remade Write Post section, however, the stats no longer automatically show up there.
Are you planning on updating this plugin for complete 2.0 support?
The plugin has been updated for 2.0. Just replace the old files with the new. There were a few changes so read the version history for those.
Great plug-in! Love it. . . Nice to know how readable my “stream of consciousness” posts really are! Having the ability (I’m still using WP 1.5.2 and the older “beta” version of the plug-in) to:
. . . throw some returned values onto the pages is great as well.
Now, for me to admit my ignorance and ask my question! How would I turn the above code into something that would return values for the total of all published posts (instead of some specific page, etc.)?
I would like to put the total “readability” sum of all posts on the index page of the blog. Remember, the syntax would need to apply to WP 1.5.2 — not 2.0 (yet ;))
Your help would be greatly appreciated!
Thanks.
– Dave
Well, you’d need to get all of the text for every post and run it through the same code for a single post — but I don’t recommend it. It would be a pretty big resource hog. I don’t think a readability index generated in this way wouldn’t be very accurate since it would just become an average. And there are more efficient ways (I don’t know what they are, but there MUST be) of getting a total blog word/sentence count.
How would it be possible to get the information displayed within the actual post so my readers can see it?
(I know I can create custom fields and enter the information myself. However, I’m lazy and would like it done automatically. I also don’t trust myself to be honest.)
Ignore my stupid comment above, I just found the answer in your documentation.
Installed it and it works perfectly. I’m running WP 2.0.
Thanks for your work, well done.
Thanks, it works nicely! Although is there a way to make it so it ignores links?
strip_tags isn’t working quite right. If I have header tags (H1, H2, etc.) around Title of Film, that counts as 9 words: the opening bracket is one word, h1 is one word, and the closing bracket is one word. So I’m already at 3 words and I haven’t even gotten to the actual words in the post.
This is a solid plugin and much better than the way I’ve been doing this for the past 6 months (opening edit-form-advanced.php and dropping raw code in place, making updating that much more problematic). But this plugin doesn’t work that great for blogs.
There’s one line to change in wordstats.php that makes this a much more accurate count of words. Look for the comment “What about dashes (vs. hyphens).” Leave the next line commented out and paste this after that:
return(count(preg_split(‘/\s+/’, $this->text)));
That will give a much closer number to the actual words in the text. One of my posts was 563 words with that change and 622 without, so it makes a big difference if there’s HTML in the post. Still, even with that change something like text.
can’t get this to work in wordpress 2.0.4 in the write tab… any ideas?
Great plug-in works fine in wordpress 2.0.
But i want to use it in Moodle as module or blog. Is it possible?
Your free to adapt the code, of course, as it is GPL. The plugin comes with a library that does all of the analysis. You just need to write an interface to Moodle on top of that. (This is how the Wordpress plugin works—as an interface to Wordpress on top of the library.)
Thank you John, i would write the interface to Moodle.
It’s not showing up when I go to post. Is there something I didn’t do or should do?
It only shows up after you write something when you click Save and Continue.
[...] Word Statistics: Muestra estadísticas sobre la facilidad de lectura de una entrada al guardarla o editarla. [...]
hello, the download link here: http://flagrantdisregard.com/wordstats/ is broken, could you fix it please?
Thanks, it’s fixed.
[...] you find yourself needing to count how many words you have in a post? The Word Statistics Plugin does just what you need. In addition to counting words it also counts sentences and generates 3 [...]
Hello,
I have been using this plugin for a good long time now, and recently had to update it for compatibility. Thank you for keeping this thing going!
Sincerely,
-danny
[...] Word Statistics: Muestra estadísticas sobre la facilidad de lectura de una entrada al guardarla o editarla. [...]
[...] Word Statistics: Muestra estadísticas sobre la facilidad de lectura de una entrada al guardarla o editarla. [...]
[...] Word Statistics: Muestra estadísticas sobre la facilidad de lectura de una entrada al guardarla o editarla. [...]
[...] Word Statistics: Muestra estadísticas sobre la facilidad de lectura de una entrada al guardarla o editarla. [...]