Closed (fixed)
Project:
Drupal.org security advisory coverage applications
Component:
module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
24 Jan 2013 at 21:30 UTC
Updated:
24 Mar 2013 at 21:10 UTC
This a simple module (for Drupal 7) that adds an admin page to create and enable a signature to mail, added on every mail sent by the system.
This is the link, with screenshot: https://drupal.org/sandbox/sergio.durzu/1898098
This is the link to clone git repository:
git clone --recursive --branch 7.x-1.x http://git.drupal.org/sandbox/sergio.durzu/1898098.git mail_signature
In the future (near future) I'll add drush integration and some validation, but now the module is working without problems.
Comments
Comment #1
wangqizhong commentedHi arrubiu,
Thanks very much for submitting this very interesting module.
Please find an initial Automated Review below to get your validation started:
Automatic Code Review
An automated review of your project has found some issues with your code; As coding standards make sure projects are coded in a consistent style we please you to have a look at the report and try to fix them. Anyway, note that issues found are possibly false positives and fixing all issues is not a requirement for getting through the application process.
You can find the results of the automated report at http://ventral.org/pareview/httpgitdrupalorgsandboxsergiodurzu1898098git.
Master Branch
It appears you are working in the "master" branch in git. You should really be working in a version specific branch. The most direct documentation on this is Moving from a master branch to a version branch. For additional resources please see the documentation about release naming conventions and creating a branch in git.
Code too short
This project is too short to approve you as git vetted user. We are currently discussing how much code we need, but everything with less than 120 lines of code or less than 5 functions cannot be seriously reviewed. However, we can promote this single project manually to a full project for you.
That's all I could find so far, but I will surely let you know if I find anything else.
Hope that helps improving your module.
Cheers!
Source: http://ventral.org/pareview - PAReview.sh online service
Comment #2
arrubiu commentedOk, I'll correct these errors and I've to add some functions (also drush integration), and then you will see :)
Thanks!
Comment #3
arrubiu commentedOk, I've corrected the code and add validation and integration with drush.
I've create a branch 7.x-1.x, I think that a 7.x-1.0 should be created later.
Comment #4
ykyuen commentedManual review:
----------------------------------------
1. you have to give default value when using variable_get(). for example. line 50, 57 in mail_signature.drush.inc. and also in the .module file.
2. Add a .install file and implements the hook_uninstall() for removing the variable using variable_del().
3. wrap the title and description with t() in mail_signature_menu().
4. as other reviewers said, the code is too short. would you consider adding a image file on the form such that user could add image on the signature?
Comment #5
arrubiu commentedIn the automatic check I see: Do not use t() in hook_menu()
But you in the third point tell me to use t(): what have I to do?
For the fourth point: signatures are simply in the most of case.
I would like to add a field to send a test email to see how the signature is added.
Could be ok?
Comment #6
arrubiu commentedAdded .install file to delete all variables.
Added all default values to variable_get.
The t() function to hook_menu does not let me pass the automatic review, let me know.
Added the ability to add an email for testing the signature.
About adding image: usually signatures are very simple and text-only, but if is necessary.. :)
If this module is not enough to "promote" me there isn't a problem.
Maybe in the future I'll add other functions that could help this transition, I'll post them here.
If you think that the module is ready to a "full project" and you want to promote it for me it's ok, even if my account is not promoted to "full developer".
The next module could be more complex ;)
Let me know :)
Comment #7
ykyuen commentedSorry, you are correct, we don't need to wrap the title and description with t() since it is called by default.
So ignore my point 3.
For point 4, as long as you could write more than 5 functions and 120 lines of code. that should be fine. But i do believe a signature with image would be a great feature.
Comment #8
arrubiu commentedOk, I'll add image to signature, does should be enough to promote module to "full project"?
Comment #9
klausiWe are currently quite busy with all the project applications and I can only review projects with a review bonus. Please help me reviewing and I'll take a look at your project right away :-)
Comment #10
blc commented* Since you moved the code to a new branch, the git URL in the summary should be updated.
git clone --recursive --branch 7.x-1.x http://git.drupal.org/sandbox/sergio.durzu/1898098.git mail_signature
* PHP_CodeSniffer did not find any problems.
* 7 functions, and 219 lines (including comments). Code size looks good.
* It was mentioned above that a default value needs to be given to variable_get(). According to the API documentation, this is not true for Drupal 7, and that NULL is returned if a default is not specified. No need to change your code back if you don't want, but something to note.
* I tested the functionality, and it looks good.
* A quick review of the code didn't raise any flags.
As far as I can see, this looks good for RTBC.
Comment #11
a_thakur commentedThe module still needs works and can not be RTBCed yet.
# The mail_signature.install file is missing. In mail_signature.admin.inc file in the function
You have used variable_get() to assign #default_value to various form elements. variable_get() would save these variables in the database. So once a module is uninstalled these variables have to be deleted, so mail_signature.install is needed where you would implement hook_uninstall() and delete these variables.
# The file mail_signature.drush.inc line #30
Change this to
# mail_signature.admin.inc file line#46
Since this is not a hook, so use some other word, other than implements here, intially, I confused this with a hook().
Get review bonus as said by klausi in comment no #9 which would help your application to be processed faster.
Comment #12
arrubiu commentedOk, I've added and/or edit all things from previous posts, let me know.
Comment #13
aw030 commentedAutomated review:
PAreview.sh on ventral.org: http://ventral.org/pareview/httpgitdrupalorgsandboxsergiodurzu1898098git Found some problems
Coder module: OK, nothing found.
Manual review:
- Install a fresh drupal 7.19
- Move the module package to folder to sites/all/modules
- Install module
- Go to admin/config/system/mail-signature
- Entered text, activate the signature via checkbox, enter test mail.
- Save the settings.
- Result as expected: testmail and mails got the signature appended.
No issues found in manual review and issues from comment #11 are fixed.
Only the whitespace-issues in the new .install file, now i don't know what to
set as issues-status... all works fine so it should be "reviewed by the community"
and the missing 3 whitespaces should not change to "needs work" (please correct me, if its wrong or to smooth).
PLEASE fix the 3 ->minor<- coding-convention-issues thrown by http://ventral.org/pareview/httpgitdrupalorgsandboxsergiodurzu1898098git.
Comment #14
arrubiu commentedOk, now pareview does not find errors, thanks.
Comment #15
jthorson commentedMinor spelling typo on line 52 of mail_signature_admin.inc ("Attention").
Thanks for your contribution, arrubiu!
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 #16
jthorson commentedComment #17.0
(not verified) commentedCorrect link to clone git repository