The aim of Captcha questions is to stop bots from registering/commenting on your site.
Captcha questions allows you to ask the user a question on selected forms. If the user gives the correct answer the form is submitted.
This module is simplistic yet very efficient. We had a client getting comment spam about 3 times an hour. After implementing this module, the rate is currently at 0 new spam comments the past two weeks.
When configuring the module it compiles a list of comment forms based on existing node types as well as some other common forms e.g. user_registration_form etc. Give a question and an answer, select which forms you want to protect and hit save.
No dependencies.
Permission settings, help and configure available from module list.
Git: git clone --recursive --branch 7.x-1.x http://git.drupal.org/sandbox/odegard/1842558.git captcha_questions
Sandbox: http://drupal.org/sandbox/odegard/1842558
Drupal version: 7.x
My reviews of other projects:
http://drupal.org/node/1842466#comment-6739778
http://drupal.org/node/1838644#comment-6739872
http://drupal.org/node/1768324#comment-6758168
Comments
Comment #1
gazoakley commentedHi odegard,
It seems that Trick Question provides very similar functionality. Could you describe how your module differs?
We prefer collaboration over competition, therefore we want to prevent having duplicating modules on drupal.org. If the differences between these modules are not too fundamental for patching the existing one, we would love to see you joining forces and concentrate all power on enhancing one module. (If the existing module is abandoned, please think about taking it over).
There are a few text strings in your module that don't use t() - examples include lines 22-23, 32, 67 and 72 on .admin file. I can see you do use them elsewhere - but it should be used wherever possible to help ensure that modules can be translated.
There is also Drupal Sniffer error for lines 16-19 of your .admin file. This isn't a major issue, but for variable assignments you can go past the 80 column limit ("Lines containing longer function names, function/class definitions, variable declarations, etc are allowed to exceed 80 chars.")
Comment #2
gazoakley commentedComment #3
laura s commentedAnother potentially duplicated project is http://drupal.org/project/riddler
I am not big on forcing collaboration or rejecting based on vague impressions of duplication, but if your module is not different from these in some significant way, approval may prove to be difficult. Also, as a matter of smart practice, you will want to note the similarities and differences in your project description, even if approved, so that users can make an evaluation as to whether your project will be best for their needs.
Comment #4
odegard commentedHi gazoakley,
thanks for your comment.
Captcha questions does indeed offer very similar functionality to Trick Question. There are two reasons why I hope Captcha questions will be approved as a new project.
Sadly the maintainer is unable to maintain the module as keenly as he wants to. I could, as you suggest, adopt the module but I would likely change most if not all of the code as I find my code is clearer (obviously, it's my own code!), especially if I end up as the main maintaner. I also believe my module won't have problems on windows servers (an issue with Trick Question) due to how the form ids are found.
I never found Trick question in my searches. I think the name Captcha questions (having captcha in the name) is more descriptive of it's use and will make it easier for people to find it when searching for anti-spam modules.
I plan to expand on the module like offering rotation of seleveral questions and different questions on different forms (hence the plural in Captcha questions). I could very well do that with an adopted module too, so I won't use that as an argument.
I understand completely that collaboration is preferred over competition, and I don't want to sound like a jerk, but I think the module name is not optimal, and I would change the code anyway.
Also, I've made changes to conform with both ventral and coder.
Comment #5
odegard commentedCorrect, Riddler is also a module offering similar functionality. The maintainer has stated in the issue queue that he is too busy to work further on the module, so I guess what I said about Trick questions also applies to this module.
One difference from Riddler is that it depends on the Captcha module.
No hard feelings if Captcha questions won't be accepted. Either way it was a nice learning experience. I'm prepared to put in time to develop it further if it is accepted.
Comment #6
gazoakley commentedHi odegard,
Thank you for clarifying the differences between your module. I agree that your project name is clearer :-). Given that your readme states that you're considering porting this to Drupal 8 and you appear to want to add additional functionality that will make your module more significantly different to Trick Questions I'm happy this isn't a major issue.
I noticed you've fixed the PAReview errors - cheers :-). However, your fixes to use t() could maybe use some tweaking - you shouldn't normally pass variables to t():
http://api.drupal.org/api/drupal/includes%21bootstrap.inc/function/t/7
For example:
$description = t(variable_get('captcha_questions_description', 'Please answer the question'));
May be better written as:
$description = variable_get('captcha_questions_description', t('Please answer the question'));
Otherwise translations may be requested for user specified values. This is a minor issue though. :-)
I think the code looks generally clean, and looking through the project application check list I don't see any issues. Would anyone else like to comment?
Comment #7
laura s commentedYes, and I would consider that a drawback of Captcha questions. The module title suggests captcha integration, for one. For another, the Captcha module has provided the basis for a number of contrib projects that expand the variety and approaches of captcha challenges. The captcha admin interface even allows administrators to select what kind of captcha should be used on each form, including webforms. Duplicating that functionality not only seems unnecessary, but would be a bit of a pain or potential source of conflicts for site administrators who are using other methods elsewhere on their site.
I would not consider this an issue for holding up @odegard's approval for project development, but I do consider it a feature that makes this particular module less appealing than it might be otherwise. (I have not reviewed the code, just responding to the described feature set.)
Comment #8
odegard commentedCAPTCHA is a challenge-response type of test that is hard for bots, easy for humans. I'm not trying to be difficult here, I just wanted to argue that the CAPTCHA module is itself an implementation of a CAPTCHA type scheme to prevent spam, and there should be room for other modules using the CAPCTHA name without being affiliated with one another.
That being said, I agree one might believe Captcha questions integrates the CAPTCHA module, and I won't mind changing the project name to something with "Anti Spam" in it if there is a concern people would be confused about the name.
I find it very helpful when modules list similar modules on their project page, and I have no objections to listing both Riddler and Trick Question as well as CAPTCHA (and others) explaining the differences to avoid confusion.
To expand on the difference between CAPTCHA and my module: Captcha questions is a very simple yet effective module. It does not meddle with caching nor the database. It's just a module that provides good protection with very little overhead. I believe integrating with CAPTCHA would be total overkill for something as simple as this.
Captcha questions does not interfere with the CAPTCHA module, and I would explain this on the project page.
So, I would prefer keeping the name, but will rename it to something else if you still think there's a risk of confusion.
Thank you all for your time!
Comment #9
odegard commentedThanks gazoakley, code is updated. Please review :)
Comment #10
odegard commentedAdded optional logging with watchdog.
Comment #11
thamba commentedHi odegard,
Very nice and simple module and it seems to work fine. Here are a few issues I came across using coder:
captcha_questions.module
'#description' => $description,'#title' => $question,In the form description markup, I found a minor typo:
You could also do simpley 'What is 1+1?'' but some bots may figure that out.Otherwise, I don't see any major issues. Good work! :)
Comment #12
odegard commentedHi thamba, thanks for your review.
I've changed the offending lines to
(ref. this http://drupal.org/node/28984)
and fixed the typos.
I've also done a new review: http://drupal.org/node/1768324#comment-6758168, added to top.
Comment #12.0
odegard commentedAdded dir to git close
Comment #13
odegard commentedAdded PAReview: review bonus tag.
Comment #14
thamba commentedGreat! I have done reviewing and testing this module and I don't find any issues.
Comment #15
gazoakley commentedEverything is passing on PAReview. Looking through the code everything seems clean - there are reasonable comments and output seems to go through check_plain when relevant. Overall the quality of this module seems good. I don't see why this shouldn't be marked as RBTC - please let me know if I've missed anything.
Comment #16
klausimanual review:
But that are not application blockers, so ...
Thanks for your contribution, odegard!
I updated your account to let you promote this to a full project and also create new projects as either a sandbox or a "full" project.
Here are some recommended readings to help with excellent maintainership:
You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and get involved!
Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
Thanks to the dedicated reviewer(s) as well.
Comment #17
odegard commentedThanks klausi! I will study the links and promote the project when I'm confident I know the routines, and when I've written a better description on the project page.
Comment #18
klausiJust leave issues at "fixed", they will close automatically in two weeks.
Comment #19.0
(not verified) commentedAdded review