Skip to content

WordPress Plugin: Flexible hReview

I'm a big fan of Microformats. Essentially, they're all about adding extra data to your data, making it more discoverable and useful. They're easy to use too: you just add classes to your existing (X)HTML in the prescribed manner. The address information in footer of this site is marked up in hCard format, for example.

I write occasional restaurant reviews on a group blog with friends: Salty Cracker club. We score each restaurant out of ten on a few categories: Atmosphere, Staff, Service, Food, Wine, Value for money.

I wanted to started marking these up as hReviews for better data richness and search engine listings, so I went searching in the WordPress Plugin repository. I didn't find anything that quite matched my requirements, so I decided to write one myself.

Flexible hReview allows you to write multi-dimensional reviews attached to a Post, then display the review wherever you like using a php function, or a WordPress shortcode.

While testing the plugin with Google's Rich Snippets Testing Tool (more on Reviews specifically) I discovered that only the first rating category (in Salty Cracker's case, Atmosphere, not necessarily representative of the review as a whole) was picked up and used. To provide a more representative rating, I added an option in the plugin to automatically generate an overall score, and add that as the first rating. An example: using a search string mr chan cape town review shows the following at the bottom of the first page of results (at the time of writing):

Our 10-scale rating is converted to a standard 5, and is displayed as stars, giving a quick visual guide to the score.

The Flexible hReview plugin can be downloaded via the Plugins menu of the WordPress dashboard, or from either of the links below.
Download Flexible hReview from WordPress.org.
Download or Fork Flexible hReview from GitHub.