A quick review of two Related Posts plugins for WordPress

 Mitcho found a post I wrote about adding Related Posts to a WordPress blog and said:

I would recommend to you and your readers a plugin I wrote, Yet Another Related Posts Plugin. It’s similar in functionality, but has been built with admin-friendliness in mind, and doesn’t require you to edit your theme files. Check it out!

I checked it out and I am impressed! The idea behind related posts concept is that a reader may want to see other posts written by the author that are related to the post he or she is reading. A good related posts plugin  should automagically create a small list of related posts and attach it to the end of the post. Creating a list automatically is the easy part. The hard part is the magic used to find the posts that are related to the post.

A popular related posts plugin is the WP 2.3 Related Posts plugin by Denis PaoPao. It uses WordPress’s native support for tags to build the list. For this plugin to work you must add tags to each post. I have used this plugin on this blog since I upgraded to WordPress 2.3.

Mitcho uses a different technique. He gratefully acknowledges the work of several people, Peter Bowyer, Alexander Malov, and Mike Lu. The key part of this plugin is the algorithm to identify related posts. Peter uses MySQL’s fulltext search score to identify related posts.

Since I am an empirical type of guy I put it to a little test. I activated the plugin on this blog and put the related_posts call in the main WordPress loop. Although the plugin is admin-friendly you have to manually edit your theme to get it into the main loop. Now each post had two lists, one generated by YARPP and one by WP 2.3 Related Posts plugin. This makes for a wordy post but I expect to print both lists for a short time. Since my main page had twenty posts, I printed off the main page of the blog.  I found that I preferred the YARPP related post list for ten posts. Some of the lists were actually quite good. Two of these posts won by default. I had forgotten to add tags to the post. That is a plus for YARPP. Since the YARPP algorithm does not require tags it created a list where WP 2.3 Related Posts plugin did not. I found it interesting that I did not find a related post list created by WP 2.3 Related Posts plugin I liked better than YARPP. Hmm… Another interesting fact I learned is that I found ten posts in which neither related posts list were particularly related the post. Oops!

After this small test it is pretty obvious that although YARPP is not perfect, most of the time it creates a list that I preferred over WP 2.3 Related Posts plugin. At its worst YARPP creates a list like the list created by WP 2.3 Related Posts plugin that is unrelated to the post. Great job Mitcho and thanks for the tip!