WP Captcha-Free

Description:

WP Captcha-Free blocks comment spam by using a combination of time-based hash (a.k.a. Time Based Tokens, TBT) and JavaScript (AJAX). When a comment is posted the plugin validates a hash based on time (and some other parameters). Comments posted via automated means will not have a hash or will have an expired hash and will be rejected. Unlike using a captcha, this does not place any burden on the commenter.

Additionally, WP Captcha-Free uses ajax to get the hash only when the form is submitted instead of adding it statically to the page (which is cached by caching plugins). This adds another layer of security and makes it compatible with caching plugins like WP-Cache.

Features:

  1. Blocks automated comment spam and ensures that your commenters are human.
  2. Works without inconveniencing visitors with CAPTCHAs, challenge questions, etc.
  3. The plugin requires no database access and adds almost zero overhead.
  4. The plugin works out of the box without any configuration or setup.
  5. Compatible with all cache plugins, including WP-Cache.
  6. Doesn’t require editing any .php files.

Installation:

Just download the .zip file and upload the file ‘captcha-free.php’ to your ‘/wp-content/plugins’ directory. Now login to the Wordpress administration area and activate it under the “Plugins” section. That’s it! WP Captcha-Free will start blocking comment spam behind the scenes.


Rating: 1 Star2 Stars3 Stars4 Stars5 Stars (33 votes, average: 4.06 out of 5) Loading ...
Size: 2.6 KB
Downloads: 1816 [Download Now]

78 Comments

  1. dave
    Posted February 21, 2008 at 6:52 pm | Permalink

    Ok cool deal

  2. Posted February 25, 2008 at 10:03 am | Permalink

    Grabbed the plugin and testing it on a new site now. Using the latest version of WP. SHall give you a shout should i run across any problems.

    Regards
    Off-it

  3. Posted March 1, 2008 at 12:26 am | Permalink

    I wonder how you can assume a result made by computer-generated computations (using JavaScript) ensures a comment is written by a humain being. All your plugin does is to ensure one uses a browser to post a comment. Say I develop a Firefox plugin to spam your blog. Your plugin won’t be able to stop it.

    Moreover, what happens if a visitor has deactivated JavaScript in his browser? What would happen if the user is behind a proxy server? I guess visitors won’t be able to comment in both cases…

  4. iDope
    Posted March 1, 2008 at 12:57 am | Permalink

    You are right about the first part. Yes, someone can use a browser to spam. But do spammers do that? Won’t it considerably slow them down? No plugin is foolproof. Spam and anti-spam tech evolves constantly. For *now* this works.

    Yes, it clearly does require JavaScript. But, about 94% users have JavaScript enabled as of Jan 2007 (source: http://www.w3schools.com/browsers/browsers_stats.asp). That number is likely more now if you notice the trend. For me its a choice between using a captcha and inconveniencing 100% of my visitors or <6%.

    No, proxies don’t matter (unless the proxy filters out JS).

    BTW, thanks for your comments. If you have any suggestions please do let me know.

  5. Dean
    Posted March 2, 2008 at 5:33 am | Permalink

    It looks like you got your idea and the name of your plugin from WP-SpamFree. Also you have copied most of the text in the bullet points of your description from that plugin as well-almost word for word. You need to be careful because that is a DMCA violation. With GPL you have to give attribution for code,but you can’t copy marketing text or descriptions.

  6. iDope
    Posted March 2, 2008 at 11:33 am | Permalink

    > It looks like you got your idea and the name
    > of your plugin from WP-SpamFree. Also you have
    > copied most of the text in the bullet points
    > of your description from that plugin as
    > well-almost word for word.

    Not true, in fact I first saw WP-SpamFree after I had completed the plugin and was writing a description (not very good at documentation, I was looking what other similar plugins had written). After reading WP-SpamFree’s feature list I couldn’t write mine another way since both plugins essentially offer the same advantages. But you are right, that’s a terrible thing to do in the age of DMCA (though I am not a US citizen :) ) and I’ll reword my feature list in the next update.

    The idea is not really the same either. My plugin uses time-based hash (generated on the server side) and JavaScript (AJAX) while WP-SpamFree uses JavaScript and cookies. If you look at the code I am sure you’ll find no similarities there either.

    Anyways, thanks for looking at my plugin and I hope you’ll still give it a try. Criticism (constructive or otherwise) is always welcome :) .

  7. zoz
    Posted March 7, 2008 at 2:19 am | Permalink

    Nice plugin :)

  8. Samuel
    Posted March 8, 2008 at 7:30 pm | Permalink

    Hi!

    Your plugin is very promising, but it doesnt work together with Better Comments Manager.

    Could do you make your plugin compatible with it? (maybe make some check about if the user is logged, and if logged no need to make hash check).

  9. kakiyomi
    Posted March 9, 2008 at 1:59 am | Permalink

    oh thx 4 plugin

  10. Posted March 10, 2008 at 9:09 am | Permalink

    Hi there, I’d love to use your plugin but unfortunately it stopped all comments from comming in. Once the user clicks “submit comment” it says “please wait…” and nothing happens. The theme we are using is wp-magazine.com

    thanks!

  11. iDope
    Posted March 10, 2008 at 9:36 am | Permalink

    Hi Sandra,

    Thanks for letting me know. Can you enable the plugin on your blog for a little while so I can see what’s going on?

  12. Posted March 10, 2008 at 12:30 pm | Permalink

    Hi,

    I had not uploaded the .php file right into the plugin directory. Ooops! IT works now and it’s a beauty! Thank you soooooo much!

  13. Posted March 21, 2008 at 5:51 pm | Permalink

    Hi There,

    I installed the plugin and noticed that my comment spam levels dropped to zero. This is great! However, I tried to post a comment on one of my posts, in response to some elses comment, and noticed that the form would not sumbit. When I clicked on the “Post Comment” button, it turned into a “Please wait” and then just stopped. The comment never got posted. I tried several times with the same result. When I de-activated the plugin I could post comments again.

    Any idea what might be causing this? Anyone else experienced a similar issue?

    Thanks,
    Stephen

  14. iDope
    Posted March 21, 2008 at 10:41 pm | Permalink

    Stephen,
    You may have uploaded the captcha-free.php file to a sub-directory of your plugins folder. Please upload captcha-free.php directly to /wp-content/plugins folder. Let me know if this works for you.

  15. Nick R
    Posted March 27, 2008 at 3:32 am | Permalink

    New to blogging and gutted to have spam comments - got my hopes up that I had some readers! When I found your plugin via Wordpress the hopes have gone up again. I will let you know if there are any issues. Thanks for your time and know how.

  16. Adrian
    Posted April 2, 2008 at 7:22 am | Permalink

    Would be cool to see this work on the user registration form.

    thanks.

  17. Marco
    Posted April 10, 2008 at 3:46 am | Permalink

    Stephen,

    I bet you are running WP 2.5
    I had captcha free running on 2.3.?
    After upgrading to 2.5 i had the same as you. I gues captcha-free doesnt work on 2.5

  18. Jim Robson
    Posted April 11, 2008 at 7:27 am | Permalink

    It’s not working for me. I installed and activated the plugin, but the spam is getting right through.

  19. Frank Zondo
    Posted April 11, 2008 at 2:32 pm | Permalink

    Thanks for a great plug-in!

  20. nogu
    Posted April 19, 2008 at 12:59 pm | Permalink

    nice work

  21. S
    Posted April 22, 2008 at 7:48 am | Permalink

    Hi,

    I keep getting the error: Invalid Data: Please go back and try again.

    I figure it has to do with the code below, but I can’t seem to make it work. It does work for some visitors but not others.
    // Validate the hash
    add_action(’preprocess_comment’, ‘cf_comment_post’);
    function cf_comment_post($commentdata) {
    // Ignore trackbacks
    if($commentdata[’comment_type’]!=’trackback’) {
    // Calculate the timehash that is valid now
    $timehash=timehash($commentdata[’comment_post_ID’],time());
    // Calculate the timehash that was valid 1 hour back to give some cushion
    $timehash_old=timehash($commentdata[’comment_post_ID’],time()-3600);
    if($_POST[’captchafree’]!=$timehash && $_POST[’captchafree’]!=$timehash_old)
    wp_die(’Invalid Data: Please go back and try again.’);
    }
    return $commentdata;
    }

  22. Posted April 22, 2008 at 11:49 am | Permalink

    Maybe you can update your entry/plugin to show if/make it wordpress 2.5 compatible.

  23. Jason
    Posted April 25, 2008 at 12:16 pm | Permalink

    Simple suggestion for future updates: the tag containing “Spam protection by WP Captcha-Free” should have an id attribute.

    Anyway, nice plugin. Seems to be working well for me.

  24. Nate
    Posted April 28, 2008 at 12:03 pm | Permalink

    I’ve installed Captcha-Free on my blog, running WP 2.5.1, when a comment is posted, you just get forwarded to Google, for some reason, and the comment isn’t posted?!

    http://hintofsarcasm.com is the address, any ideas?

  25. Posted April 29, 2008 at 11:24 am | Permalink

    I installed this the other day, and it’s fabulous. I’m getting more comments than I was with the often faulty, always irritating captcha software I was using before. Just one thing, though. People who use AOL’s browser are getting an error when they try to post: Invalid data. Please go back and try again. Any thoughts I can pass along to them, or are they SOL?

  26. Fox
    Posted May 2, 2008 at 4:24 pm | Permalink

    Thanks. This is great.

  27. lala
    Posted May 4, 2008 at 11:22 am | Permalink

    really great :)

  28. Posted May 5, 2008 at 5:20 pm | Permalink

    hi there .thanks for plugin:

    Does anybody know if tis script is compatible with Wordpress 2.5.1?

    Thanks in advance for any help on this!

    best regards

  29. iDope
    Posted May 7, 2008 at 3:38 am | Permalink

    WP Captcha-Free is not compatible with Wordpress 2.5, yet.

  30. Adhi Yudho
    Posted May 10, 2008 at 1:58 pm | Permalink

    Thankyou.. i will try this plugins.. :)

  31. Posted May 10, 2008 at 1:59 pm | Permalink

    @iDope, yes .. true.. :( i’m not read your las comment… sorry.. but i will wait your next version… :)

  32. Hello Dudes
    Posted May 12, 2008 at 12:37 pm | Permalink

    So this doesn’t seem to work anymore.. I don’t see the captcha and it’s not asking me to confirm any image….

  33. Kevin
    Posted May 13, 2008 at 10:44 pm | Permalink

    great idea and work! thanks

  34. Martin
    Posted May 14, 2008 at 5:24 am | Permalink

    Is there any img verification for posting?

  35. iDope
    Posted May 14, 2008 at 5:40 am | Permalink

    The aim of this plugin is not having to use image verification.

  36. BaBy RoDrI
    Posted May 30, 2008 at 9:16 pm | Permalink

    Mmmm…. que mal ya no funciona en Wordpress 2.5 :(

  37. Thomas
    Posted June 17, 2008 at 6:17 am | Permalink

    When people try commenting on my Wordpress MU site all it does now after you click submit comment is to change that button to “Please wait”. So no new comments can be added.

    100% spam free though :)

  38. Webspider
    Posted June 20, 2008 at 11:00 am | Permalink

    Work in new version WP ?

  39. Amiro
    Posted June 28, 2008 at 7:37 am | Permalink

    Work PERFECT !

  40. iDope
    Posted July 8, 2008 at 9:49 am | Permalink

    @Thomas: Please make sure you copy the “captcha-free.php” file directly to the wordpress plugins folder and not to a subfolder.

  41. Philix
    Posted August 1, 2008 at 4:20 am | Permalink

    This is a great plugin

  42. Jason
    Posted August 7, 2008 at 7:51 pm | Permalink

    Wordpress: 2.6
    Theme: Redie 3.0 by Steve Arun

    I have installed your plug-in and I get the following message after I try and comment on a post:

    Invalid Data: Please go back and try again.

    I have it disabled currently but would love to give it some use… spam bots are so annoying…

    Thanks!

  43. iDope
    Posted August 8, 2008 at 3:34 am | Permalink

    @Jason: Are you sure you copied the captcha-free.php file to /wp-content/plugins directly and not to a sub-folder?

  44. Posted August 8, 2008 at 11:57 am | Permalink

    @iDope: Thanks for the quick response. Yes I am sure that captcha-free.php is in /wp-content/plugins and not a subdirectory. I am assuming you are considering the wordpress directory the root? I deleted and just now redownloaded from this page and uploaded. Still nothing though. I get the same error.

    permissions are 644 so I don’t think that is any issue. there isn’t any modifications to the template code that needs to be done, is there? (As I do not have a default template)

  45. kitich
    Posted August 28, 2008 at 3:43 am | Permalink

    Great plugin, tnx.

    But i have problem - it’s ok to comment without login to wp, but if i login to my wp i see “Invalid Data: Please go back and try again.”

    PS plugin is in root of wp-content/plugins/

  46. Madeira
    Posted October 9, 2008 at 6:27 am | Permalink

    Hi

    We are also going to start a blog soon and were wondering how to takle comment spam.

    Thanks for the info!

  47. Internet Marketing
    Posted October 23, 2008 at 3:32 pm | Permalink

    It works in a very simple way, great work!

  48. busby seo test
    Posted November 18, 2008 at 5:33 am | Permalink

    Would be cool to see this work on the user registration form.

    thanks.

  49. ulu
    Posted December 23, 2008 at 8:45 am | Permalink

    same error as the other guy
    Invalid Data: Please go back and try again.

  50. Page Rank
    Posted January 3, 2009 at 5:43 pm | Permalink

    Works perfect in my WP 2.7 !

  51. iDope
    Posted January 7, 2009 at 12:57 am | Permalink

    @kitich: I think your theme is not calling the ‘comment_form’ action when you are logged in.

  52. Posted January 14, 2009 at 8:22 pm | Permalink

    “The article is very informative as well as so creative. You have very great knowledge having this subject. So nice! It’s a great to see you here.

    Thanks!

  53. zoomag
    Posted January 23, 2009 at 4:38 pm | Permalink

    Grabbed the plugin and testing it on a new site now. Using the latest version of WP. easy installed and easy in use! this plugin helped alot and I did noticed that my comment spam levels dropped well. Thank alot!))

  54. MAC
    Posted January 27, 2009 at 11:54 am | Permalink

    HI I cant seem to work it out

    Everytime i try to post a comment i keep getting this mesage: Invalid Data: Please go back and try again

    I have the plugin in the plugins folder (_root)

    What can i do?

    Cheers!

    MAC

  55. smart maxx
    Posted January 31, 2009 at 4:29 am | Permalink

    http://wordpresssupplies.com/wordpress-plugins/captcha-free/

    This plugin doesn’t works. It shows only link to this page and no picture.

  56. iDope
    Posted January 31, 2009 at 6:54 am | Permalink

    @smart maxx: I think you missed the point of this plugin. It stops spam *without* captcha.

  57. iDope
    Posted January 31, 2009 at 6:55 am | Permalink

    @MAC: Send me a link to your blog and I’ll check it out.

  58. sundhar
    Posted February 26, 2009 at 10:36 pm | Permalink

    nice plugin

  59. Irfan Faruki
    Posted March 3, 2009 at 7:08 am | Permalink

    Plugin does not seems to work fine with wp 2.7. Any ideas?

  60. John Barrett
    Posted March 6, 2009 at 1:31 am | Permalink

    Is this working on my blog? I thought that I would get a enter code below the captcha numbers/letters. ON mine nothing is happening. My blog is at http://blog.meleana.info it is a blog about flash, but I get all these porn comments, I don’t see the connection. Wordpress is too hard, and am not sure if I want to continue blogging as I spend way too long delete spam, yikes!

    Thanks so much for all your hard work on creating some files to help prevent spam, I appreciate all your work.
    Johnny

  61. 0% nazwy
    Posted March 8, 2009 at 1:34 pm | Permalink

    Nice. I like it!

  62. Rolando
    Posted March 13, 2009 at 11:42 am | Permalink

    Excellent, thanks for the plugin!

  63. Jack Clarke
    Posted March 26, 2009 at 1:22 pm | Permalink

    Added this cool plugin and my spam went from over 40 a day to zero, nice ! WP 2.7.1 by the way.

  64. Posted March 26, 2009 at 11:02 pm | Permalink

    @Irfan Faruki: What error are you getting?

    @John Barrett: The purpose of this plugin is *not* have the commenter to type a CAPTCHA answer.

  65. iDope
    Posted March 26, 2009 at 11:06 pm | Permalink

    BTW, I have released a new CAPTCHA plugin, more secure but still does not require commentors to type a CAPTCHA. Just requires a click to solve.

    http://wordpresssupplies.com/wordpress-plugins/clickcha/

  66. Posted April 5, 2009 at 4:03 am | Permalink

    Thanks for this great plugin, spam influx went down to zero. But somehow I get an error (http 500) on my site, when I am using MS Internet Explorer 7 to leave a comment. Firefox works fine.

  67. Toni
    Posted April 18, 2009 at 2:23 pm | Permalink

    The very best :)

  68. SSG
    Posted April 20, 2009 at 12:16 am | Permalink

    I absolutely LOVE this plugin-there has been NO spam since I started using it.

    However, the last few days, I’ve noticed it will sometimes throw an “invalid data” error when a legitimate comment is submitted. It *seems* to be related to the use of ellipses (… at the end of a statement) but I’m not 100% sure.

    Using Wordpress 2.7.1, with the latest version of Captcha Free.

    Any ideas?

  69. Posted May 30, 2009 at 12:30 pm | Permalink

    nice plugin, but there seems to be a bug in the code whereby if there are more 2 or more forms on a page, and if multiple forms have a ’submit’ element id for the submit button, then the 1st form will get submitted instead.

    so, if the 1st form is a search box, it will submit a search query instead of the comment form.

    to solve it, change: document.getElementById(’submit’).click();

    to: document.getElementById(’commentform’).elements[’submit’].click();

  70. Posted June 4, 2009 at 4:38 am | Permalink

    Hello!
    Nice plug-in but I can’t make it work! I always have the “invalid-data” error…
    php file is in the plugin directory.

    Can you help me?

  71. Jimmy
    Posted June 4, 2009 at 9:04 am | Permalink

    Plugin not working, get the following message when submitting a comment:

    “Invalid Data: Please go back and try again.”

    Using 2.7.1 WP version and tested on Firefox and Safari. The plugin is in the plugins root folder. The idea is great but it seems only a few here manage to make it work.

  72. Posted June 10, 2009 at 7:16 am | Permalink

    “Invalid Data: Please go back and try again.” This error appears when visitors posting comments from any version of IE (for now I have IE8 and testing whith it).

    WP 2.7.1 php file in /content/ directory.

    The problem appeared after upgrade to WP 2.7 and makes plugin useless. Deactivating solve the problem.

  73. Posted June 10, 2009 at 7:18 am | Permalink

    * wp-content/plugins/ directory sorry

  74. iDope
    Posted June 15, 2009 at 1:54 am | Permalink

    @ibrahim: Your theme may be at fault here. As per HTML specs element IDs should be unique:

    http://www.w3.org/TR/REC-html40/struct/global.html#h-7.5.2

  75. Posted June 18, 2009 at 10:34 am | Permalink

    Running WP 2.7 and the most recent version of WP Captcha Free and it is apparently working nicely.

  76. Posted June 20, 2009 at 1:18 am | Permalink

    Hello, I’ve been using your plugin for a few days and I have both a question and a comment.

    Firstly, the comment: on line 86 of captcha-free.php you open a <small> tag but never close it. Just thought I’d point that out.

    Secondly, why don’t you use your own plugin on your comment forms here?

  77. iDope
    Posted June 20, 2009 at 2:18 am | Permalink

    @Mythender: Thanks for the feedback. But I do close the <small> tag. Maybe you have an older version?

    I also wrote the Clickcha plugin I use here and it got the space since its the newer one :)

  78. Posted June 20, 2009 at 10:17 am | Permalink

    ahh I see about Clickcha

    as for the tag, I downloaded and installed version 0.5 of the plugin automatically through the wordpress plugin directory and everything below my comment form became… well… small….

    reading the document source I found the missing tag and looking into the code of your plugin led me to line 87:
    Please note: JavaScript is required to post comments.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

Clickcha - The One-click Captcha