hReview WordPress Plugin

I thought it would be interesting to have reviews on this site follow the hReview microformat. Since this site is managed using WordPress, I’ve put together a WordPress plug-in that allows hReview-compliant reviews to be composed in the standard Page/Post editor (utilising a TinyMCE 3.x Plugin).

It’s still in a pretty simple form, and may not work for anyone else. It should look okay if you’re using Firefox, and inserting it into WordPress 2.5. If it works well for you, let me know.

Download hReview WordPress Plugin

Get version 0.9 (released 28-Dec-11) – fixes WordPress 3.3 compatibility of HTML code editor button

Older versions:

  • Version 0.8 (released 07-Nov-10) – added “reviewer” tag to comply with expected format for Google
  • Version 0.7 (released 21-Dec-08) – incorporated a settings page, and uses native wordpress popup UI
  • Version 0.6 (released 28-Jun-08) – works with WordPress 2.5 but broke backward compatibility
  • Version 0.5 (released 23-Mar-08) – last version backwardly compatible with WordPress 2.3 and before.
  • Version 0.4 (released 9-Sep-07) – worked with the HTML code editor as well.
  • Version 0.3 (released 5-Jun-07) – worked with the GUI editor but not the HTML code editor in WordPress 2.1+
  • Version 0.2 (released 23-Sep-06) – worked with WordPress 2.0.x but not WordPress 2.1+
  • Version 0.1 (released 5-Sep-06)

How to Install and use the Plugin

  1. Unzip the plugin into your wp-content/plugins/ directory. It should automatically create an hreview/ subdirectory.
  2. In your WordPress admin page, go to the Plugins section and Activate the “hReview support for editor” plugin.
  3. When you go to “Write Post” or “Write Page”, click on the star logo to pop-up a simple form.
  4. Fill in the fields of the form, particularly the name of the thing you are reviewing.
  5. Click Insert and the contents of the fields will be inserted into the page or post you were composing, but marked up using the hReview microformat.


Screenshot of a final review written using the plugin

Screenshot of using the plugin to write a review

In The Wild

Finally, you may also be interested in my Reviewers’ Manifesto.

122 thoughts on “hReview WordPress Plugin”

  1. Hi,
    Nice plug-in. It works fine. The only problem I have with it is when I am trying to put few ratings on the same page. Plug-in adds multiple rating bi=ut crashes HTML. Any suggestions?

  2. Thanks Alex. Could you please provide a little more information? It would be helpful to know the version of WordPress and the browser (and its version) that you’re using. Does it break the formatting when you write the review, or when you display the review in the final page. If the latter, please note your blog theme too. I have seen multiple reviews on the same page work, done by others…

  3. Why did you make the authoring part a plugin rather than adding custom fields to the existing screen? We lose the rich edit control (at least in the screenshot) and category list with this configuration.

  4. Bill, I want to be able to embed reviews within pages/posts (rather than having a post that must be a review and nothing else), and I wanted to be able to support multiple reviews per post. The WSIWYG editor is not lost, just suspended, and after the fields are complete, you drop back into it with the review inserted as well. You can then do as much funky editing to the review as you like, but the microformat structure is set up for you.

  5. Does anyone know the name of the wordpress plugin that creates a list of your posts in a category instead of just displaying them one after the other? I want it so that when someone clicks on a category they just get a list of posts from that category.

    I'm sure Ive seen one…and sifting through the WP site is a nightmare

  6. Does this only work in WP 2? I tried it in WP 1.5.2 but though no error message I cannot see any icon in the Write / Post page.

  7. The ButtonSnap plugin page isn’t coming up at the moment, but I believe it requires WordPress 2.x functions to work. The hReview plugin uses the ButtonSnap plugin, so I wouldn’t expect it to work in earlier versions of WordPress.

  8. What I want to do on my blog, is every few hours take the oldest post and move it to the
    front of the queue, all automatically. Anyone know if there is a plugin that can do this or
    a simple way to set up another plugin to do this (use my own feed perhaps)?

  9. PLeeease update this so I can use it with 2.1

    And does it have multiple review options, so that I can rate (say) :
    service – 2 stars
    food – 3 stars
    ambience – 5 stars

  10. I was on holiday when WP 2.1 came out and haven’t had a chance to investigate the changes in detail. However, it seems that the ButtonSnap class that I use to add buttons to the WSIWYG editor (TinyMCE) doesn’t work in WP 2.1 since there’s a new version of TinyMCE being used. I hope to debug this soon, but I notice that other plugins are also having trouble with it.

  11. Anyway to subscribe to your site or post so we’ll know when you update? =o)…

    Looks good I’d like to give it a try but I already updated to 2.1…


  12. I’d love to be able to say that a version to support WP 2.1 was just around the corner, but I can’t. And now it seems that WP 2.2 is here, I’ll need to take a look at that.

    What I’d hoped to be able to do was follow the learnings from the Viper Video Quicktags plugin that also puts buttons into the WYSIWYG editor. However, it never managed to work for me in WP 2.1 so there wasn’t anything to follow.

    Does anyone know of another plugin that has successfully gotten buttons into the WP 2.1 (now WP 2.2) TinyMCE WYSIWYG editor?

  13. For those who have been asking me about upgrading this plugin for so long.. here is version 0.3 which should work with WordPress 2.2. Well, it works with my version of WordPress 2.2.

    I don’t know if it works with WordPress 2.1, but I suspect it might. If someone can test this, and confirm it here, I’d appreciate it. It might even still work with WordPress 2.0.

    And calling out a big Thanks to Viper007Bond whose Viper’s Video Quicktags plugin v5 gave me many good hints on how to get WYSIWYG buttons to work. It would’ve been very tricky without you solving this already!

  14. If you’ve just installed and activated it, and the star icon isn’t appearing in the TinyMCE toolbar, then you probably need to clear your cache and reload the page. On different browsers, you do this in different ways. In FireFox 2 you go to the Tools | Clear Private Data menu option, then tick Cache. In IE 6 you to go Tools | Internet Options then click the Delete Files button.

  15. hi andrew,

    is it correct that the new version only works with the wysiwyg editor? (the old one worked with the non-wysiwyg wp editor!)


  16. I love this plugin, but I would love it even more if it added a button to the non-WYSIWYG editor too! Is there an easy way to tweak this?

  17. Elle, I was working on that exact feature, so I’ve got some good news: it’s now available. Try version 0.4 for the retro feel of inserting hReviews into HTML code.

  18. For those that read down this far, I’ve just moved my blog across onto WordPress 2.3.1 and the hReview plugin seems to work fine. At least, it appears in the editor and inserts text, which have always been the tricky bits before.

  19. this completely FAIL’s on my WordPress 2.3.1
    it even manages to hang the whole blog for some reason (I have tried deactivating all other plugins and switching to default theme I had a virgin wp 2.3.1 ) the only way to get it back was delete the hreview plugin dir via ssh

    I would dearly like to use this type of plugin is there any debug I could do I would do it but I don’t see any way

    any help would be appreciated


  20. @john.jones, please provide a little more information to allow me to reproduce the problem. For example, what version of the hReview plugin did you install, what browser (and version) were you using, and what version of PHP does your web host use (if you know)?

  21. Hi Walter.

    The point of the plugin is that it makes it easier to write hReview compliant reviews. You could do this yourself, if you know the hReview spec, and are willing to use the WordPress editor in code mode. However, most people would find it easier to fill in some fields, and have the plugin insert the text into the editor for you with all the necessary code.

  22. Does the hReview format require that the description be enclosed in blockquote? I’m not crazy about how my theme displays blockquotes if that’s going to be the entire review. Or perhaps I’m using the description field incorrectly and the review itself should be written below the stuff inserted by the plugin.

    I’m a bit disappointed in the way that hReview (the format not the plugin) handles type. It’d be nice to specify that this is a review for a movie or a restaurant, etc.

  23. My error log shows:

    file has no execute permission:

    The directory and folder settings are all 755, as they should be.
    Do you know what might be wrong?

    When I click the hreview button in post-new.php, I get “Internal Server Error”.

    System info:
    PHP version 5.2.4
    MySQL version 4.1.22-standard
    Apache version 1.3.39 (Unix)
    Operating system Linux
    Architecture i686

    Thanks for considering this Andrew,

  24. SOLVED

    In my htaccess file I had:

    AddType application/x-httpd-php .htm .html

    so the hreview html files were being processes as PHP.

    A year ago, as I was trying to integrate my original static html site into my new dynamic php site, I read that I should insert that line into my htaccess file. The reasoning seemed cloudy to me, but I knew nothing then, and the author sounded confident. Anyway, that was the problem.

    It works now – thanks!

  25. @Jonathon,

    Glad to hear it’s now working. I was stumped by your error message.


    hReview does not require blockquote, but I ended up using this as the WordPress WYSIWYG editor was screwing up paragraphs within a div. So, rather than a div, I went blockquote. Although, to fix the layout, the plug-in tries to override how the theme displays blockquotes in an hreview. Perhaps this isn’t working for you?

    Oh, and I think the ‘type’ field in hreviews is pointless, and I plan to remove it from future versions of the plug-in. People can then feel free to type in the ‘type’ in whatever way they like.

  26. Hey man, hreview works great. I accidentally stumbled upon it and it fits my needs of star rating + comments.

    I’m running WP 2.3.3 and tinyMCE advanced with no problems whatsoever.

    One question. I’ve looked through all the files and can’t find where to change “My rating”. I’d like to customize this bit of text without having to manually change it every time. I’ve opened all the files, looked through them, and I’ve used the Find function to no avail.

    Any advice?

  27. Hi. I tried your plugin in the editor but decided not to use it and instead just modify my theme.

    Does anyone know a website/script/anything else to actually check validity of my hReview structure?

    Is there any software of website that can dump hReview information from a given URL so I can debug my website to be in compliance with the specification?

  28. @Jay – you’ll need to edit some code. Look for the hreview_plugin_footer() function in the hreview.php file. Changing the text “My rating:” or “stars” shouldn’t cause any problems.

  29. @Maxim – I don’t know of any hReview validator pages. However, there are some plugins for Firefox that can perform validation (e.g. Operator).

  30. I have now released v0.5 of the hReview plugin. It fixes a couple of bugs, and removes the problematic “type” field from the review.

  31. I am very excited about this plugin. I am new to wordpress and have installed version 2.5. I can not seem to get the hreview plugin to work. Will it work with version 2.5?

    I have uploaded the hreview folder to my plugin directory and then activated it. I do not see any sort of star in when creating new blog posts.

    Thanks so much!

  32. I found the button to insert the reviews.

    When you are looking at the editor click on the html tab (as opposed to visual) and then you will see a button named hReview. When you click on this button the review form pops out.

    Is this where the button is supposed to be?

    Thanks so much for this excellent plugin!

  33. @Steven – I haven’t tested it with WP 2.5 since I haven’t upgraded yet. I’m actually waiting for WP 2.5.1 since I’ve heard of a bit of upgrade pain.

    You should be able to use either the graphical interface (star icon) or the HTML interface (hReview button). But if WP 2.5 has gone and broken things again, then you might have to get used to wherever the button is appearing for now. I’ll try debugging it once I’ve upgraded.

  34. Andrew,
    Love the plugin! I can confirm that it sorta’ works in 2.5.1. . .Must be done in HTML mode. . .as for changing “My Rating” and “Stars”, can be done, except make sure not to change it to “Bob’s Rating”. . .code breaks on the apostrophe in “‘s”. . .I’m excited to be able to use this and look forward to when it works in TinyMCE again. . .

  35. @Steven, @Bryan Belt, and others..

    I’ve just completed v0.6 of the plugin that works with WordPress 2.5. Note that it is not intended to be backwardly compatible with earlier versions of WordPress (although the HTML mode may work).

    New versions of WordPress come out every couple of months, it seems, and each time they tend to break things. Version 2.5 was a major version and a huge number of plugins stopped working, including mine. Given that WordPress was willing to follow a scorched earth policy for v2.5, I am happy to follow suit and removed all the code that was used for backward compatibility, including the versions of the ButtonSnap plugin. With ButtonSnap, I was using only four lines of code in it anyway. So, now the plugin is significantly smaller and that’s better for speed and memory.

    If I don’t hear of any major issues with the v0.6 of the plugin in the next week or so, then I’ll upload it into the official WordPress repository.

    I’ve just seen that they’re now beta-testing WordPress 2.6. Fingers crossed that it will work without any changes, for once.

  36. What if almost every post on my blog IS a review? I am looking for an easy way to wrap the post structure into hReview microformat. Will this plugin work for this purpose?

  37. I just tested your plugin out using WordPress Version 2.5.1 and everything seems to be working perfectly. No bugs that I have found. I noticed on the screen shots that there is a drop down box in the left hand corner for type – I am assuming choices such as movie, book, etc. – but I do not have that drop down box on my form. Is that a discarded feature?

  38. @Keith Whitt,

    You’re right – I’ve taken out the “type” field as it was problematic. I need to update the screenshots!

    Thanks for trying out the plugin.

  39. @Maxim,

    The plugin could be used for what you’re after, but it’s not intended to replace the post/page editor. I think the “Structured Blogging” plugin is more along those lines, but not sure if it supports the most recent versions of WordPress.

  40. Hi Andrew,
    Is there any chance of getting the plugin updated for WordPress 2.7? I’ve noticed that

    – The dialog box now doesn’t appear to be centred.
    – The blue dialog box isn’t using the admin colour scheme or font style.
    – The submenus on the left have a higher z-index than the dialog box, so they appear over the top of it, obscuring parts of the dialog form.
    – There’s no Clear button on the dialog box, so inserting multiple reviews in one post means the existing text has to be deleted manually. Ideally, all the textboxes and inputs would have their values set to an empty string when the dialog box appeared.
    – As the item info can be a hcard as well as a hcalendar, would it be possible to have these as extra options? A radio button to choose between a plain name, a hcard and a hcalendar event.

    The actual insertion seems to work fine, it’s just a few bits could do with some tidying up :)


  41. I second Gazza’s problems and also on my blog checking the “This is a review” checkbox does NOT show the Name/URL fields, and stars don’t change color when they are clicked until I save the post

  42. @Gazza, @Maxim,
    Thanks for letting me know. I’ve only just upgraded my blog to WP 2.7 so I’m feeling through the changes. At least the WP upgrade hasn’t completely broken everything this time! I hope to get onto developing some fixes soon.

  43. Hi Andrew,
    That’s good news – I look forward to it.

    I was half tempted to either create my own plugin, or to offer some patches for yours, but I simply don’t have the time to offer it my full attention at the moment.

  44. @Maxim, I’m not sure which plugin you’re referring to, but this one does not have a “this is a review” checkbox, nor support the clicking of stars.

  45. I have just released version 0.7 into the wild. It works with WordPress 2.7 and makes use of the thickbox script that’s now built into wordpress, for a much nicer looking pop-up window. Also, it has a settings page that allows you to configure the text used in reviews (such as it is). But no hcard/hcalendar options this time.

  46. Hi Andrew,
    The plugin installed and activated fine. On writing a new post, the button appeared (although it’s always bugged me that it’s on a new line, rather than next to the existing icons – is that a TinyMCE issue?).

    Clicking the button brought up the dialog (a little slow, but my media dialog is also that slow – I blame thickbox/WP) fine.
    Typing in a few details and hitting insert though, left me with some problems.

    a) Nothing appeared to have been inserted – not even into the HTML view.
    b) My WP now doesn’t know whether it’s in HTML view, or Visual Editor view – see Clicking the Visual Editor tab at the top does nothing. I can’t resize the main editing box.

    The error retrieved from the Firebug console:
    uncaught exception: [Exception… “Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMRange.deleteContents]” nsresult: “0x80004005 (NS_ERROR_FAILURE)” location: “JS frame :: :: anonymous :: line 1″ data: no]
    A couple more suggestions whilst you’re bug hunting, if I may:
    1) Can a version of the TinyMCE toolbar be added into the dialog box? Would save users who want to format their description from having to insert it, then going back to find the bits they wanted to format. May be more trouble than it’s worth.
    2) Now you have an options page, add another option in to include the item Type field on the dialog box. Those who want it then have it, those who don’t, can’t turn it off.

    Thanks for your hard work Andrew :-)

  47. @Gazza, I’m having trouble reproducing your problem. From what you’ve posted previously, I assume you’re using Firefox and WP 2.7. However, I can’t replicate your error using either Firefox 3 or 3.1 Beta 2. Can I ask you to clear your cache and try again? Also, the more info you post about your setup the more likely it is that I can track this down.

  48. My apologies Andrew. I just tried it with the intention of deactivating all plugins if it didn’t work, but of course, it now all works fine! As I’ve got Firefox (3) to automatically clear the cache when the browser is closed down, I can only assume that something in the cache already from that session (either from another website, or from another WP installation) was playing havoc with TinyMCE.
    Apologies, and good work! Feel free to delete my previous comment (other than the suggestions of course ;-) )

  49. Has Google picked up your microformated content and included it in it’s rich snipets? I might be interested in using the plugin if Google is going to make use of the format.

  50. @Carl, I’m running 2.8.5 here and it is working fine. Have you tried clearing the cache and refreshing the page? If still no joy, could you describe the rest of your setup?

  51. I would like to translate the plugin. Is there an easy way to do so, other than opening the .php files and changing the text?

  52. @AS, there is not much text in the plugin, so it should be straight-forward to translate if you wish. The button label text (i.e. the word “hreview”) is in the tinymceplugin/langs/en.js file; the default text embedded in the post (i.e. the words “My rating: ” and “stars”), the options page text, and the text for the quicktags button (i.e. “Add an hReview” and “hReview”) are in the hreview.php file; and the text used in the composition form (“Name of item”, “Description”, etc.) are in the hreviewinput.html file.

  53. Only taken me 3 1/2 years after the curve I’ve started to realise how useful microforamts could be – especially after hearing about them at a conference in London last week and how search engines are starting to use them more and more. Cheers for the plugin

  54. the plugin looks good, but I’m looking for something that pulls the review info from the post itself, instead of having to manually add the stars… is there anyway I could do this with this plugin?

  55. Andrew,
    I’ve just discovered your plugin but when I check my URL using the Google Rich Snippet Tool, I get the following error message..
    Warning: Missing required “item” field.
    Is it me or the Plugin?
    Also, the dReview snippet is not showing in the Google SERPS.

  56. @gadget,
    Google’s Rich Snippets aren’t 100% aligned with the hReview spec, and require certain things that are only optional in the original specification. Specifically, Google requires two of rating, dtreviewed and reviewer to be present. In order to accommodate this, I’ll update the plug-in to include a reviewer field in the hReview markup.

  57. @gadget, it’s pretty basic, but it’s done. Download v0.8 from either this site or WordPress. I have added in the “reviewer” tag, so Google should now accept it for its Rich Snippets.

      1. Yes, sorry. It looks like they’ve done some new stuff with the editor in WP3.3 and I’ll need to update the plugin to support it.

  58. In case you haven’t noticed, I’ve updated the plugin for WP 3.3 and it is working fine on my blog running this version of WordPress. Hope this resolves the issues others have been having.

    1. It’s still not showing up in the post edit tabs. I’m up-to-date with the WP versions and the new Plugin but it simply doesn’t appear?!

  59. Great plugin Andrew…Any chance you could add a field for price range as an output in a following update, this would help compliment product reviews should the editor wish to use it?



  60. Hello sir, do I have to fill “Name of item being reviewed:” field, and “Reference URL:”, or Google will detect it automatically (the link of course) and show stars in search results?
    When I fill “name of item” field, it gives me a huge h2 word, for example “Hello World”. On your website I can see only stars&author (please look here: – only stars and author). Can I delete the name? :-)

    Maciej – Poland

    1. Hi Maciej.

      This sounds like it’s more a question for Google than for me. The answer seems to be here:

      Currently, it says that the mandatory fields are “itemreviewed”, “item” and “reviewer”. So, yes, you do need to put the name of the item into the field. It won’t be picked up from the page title or link. Also, you shouldn’t delete the author name or you won’t have the mandatory “reviewer” field.

      My blog uses CSS to present the h2 title in an appropriate way for my theme. I suggest you do something similar if you’re not happy with the default treatment.

      1. Thank you very much, I’m sure it will solve my problem. However as I read on some blogs about webdevelopment, Google is treating polish websites improperly, so even if they have hReview, it’s not shown in Google search results. But I will try, maybe it will work :) Thanks a lot and have a nice day!

  61. I just downloaded the plugin, after activating I went to a post clicked the star icon and was greeted with the following error

    Fatal error: Call to undefined function wpcf7_add_tag_generator() in /xxxxxxxx/xx/xxxxxxxxxx/htdocs/wp-content/plugins/contact-form-7/modules/text.php on line 152

    1. Thanks for reporting this problem.

      However, I am also running the latest version of WordPress, and I’m not able to reproduce this error. I just posted a review and it all worked fine.

      1. Problem gets solved upgrading the plugin called WP Contact Form 7 to its last version.
        The error is not due to your plugin.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.