Closed (fixed)
Project:
Drupal.org security advisory coverage applications
Component:
module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
24 Jul 2013 at 00:01 UTC
Updated:
19 Nov 2013 at 23:56 UTC
Jump to comment: Most recent
Comments
Comment #1
PA robot commentedThere are some errors reported by automated review tools, did you already check them? See http://ventral.org/pareview/httpgitdrupalorgsandboxcaptainpants2045971git
We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)
Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #2
skek commentedHi @captainpants,
I've reviewed your module and I have the following comments:
1. Re-factor the install hook.
Do not make variable_set() there cause it is not necessary. It will just add some unnecessary overhead in this table when you don't have settings for the variables. Instead of variable_set() use variable_get(VAR_NAME, DEFAULT VALUE);
As you can see this will only return the value.
2. The variable 'little_helper_config_img' has been set but nobody delete it on module uninstall.
Please check your way you are defining submit callback for the settings form. The default save of the settings form will save all the variables by default with the key they are coming from. This means that if you don't remove the default submit of settings form it will sore the variable little_helper_config_img into database no matter that you didn't do it in your submit callback.
Better it will be to add a validate hook where you can do the things you need and leave the default submit callback to do the rest (this is only mine opinion).
3. Hook little_helper_permission() should be defined in the .module file. Otherwise you should use hook_hook_info().
4. 'access arguments' => array('little_helper_has_permission') - this should be 'access callback' instead, otherwise it will check user_access('little_helper_has_permission') which is not defined.
Feature you can make:
1. You can add image style option (preset) for image display.
Comment #3
captainpants commentedThanks for the Feedback skek :),
As for your feature request, I believe it may be unnecessary to allow image presets. The image they will supply for their helper will only be used in one part of the website and nowhere will this image need to be reused while looking slightly different.
I also changed the default branch name to 7.x-1.x so that it follows Drupal standards.
Comment #4
captainpants commentedAll coding errors/warnings found by pareview.sh have been resolved.
Comment #5
silbermann commentedHi captainpants,
here my suggestions and comments to your module.
Manual review
1. The little helper image should not be mandantory.
2. Perhaps you could add a width: 100% to the image style on line 6 in little_helper.css to make sure the image show up correctly in most cases.
3. You don't have to provide a function little_helper_has_permission() to check user access rights. Just use user_access as access callback and provide the access arguments in the array right away.
But you can remove the line with access_callback because the function user_access() is the default callback function here.
Some other notices
I don't find another module similuar to that one, but a example how to do the same without a module: https://drupal.org/node/58973. But of cause it's not useful for people without knowledge in php.
Kind regards
Comment #6
captainpants commentedThanks for the review Silberman,
Comment #6.0
captainpants commentedChanged branch name to 7.x-1.x
Comment #7
joshi.rohit100Hi captainpants,
Module looks fine to me except one thing. You can load the little_helper.css file conditionally as its is loading for all pages whether block is available or not.
Comment #8
joshi.rohit100Sorry I havn't changed the status in my comment, so I am doing it.
Comment #9
captainpants commentedDone,
Thanks for the suggestion Rohit.
Comment #10
kscheirerYou don't need to provide defaults for all your variables in little_helper_install(), just when you read the variable with variable_get.
We don't generally use hungarian notation like $o_file, but I guess it's ok.
Otherwise I can't find any major problems.
----
Top Shelf Modules - Crafted, Curated, Contributed.
Comment #10.0
kscheirerAdded some modules I've reviewed.
Comment #11
kscheirerIt's been a month without any problems reported, so I'm promoting this myself as per https://drupal.org/node/1125818.
Thanks for your contribution, captainpants!
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.
----
Top Shelf Modules - Crafted, Curated, Contributed.