Closed (fixed)
Project:
Drupal.org security advisory coverage applications
Component:
module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
8 Jul 2012 at 20:26 UTC
Updated:
10 Sep 2018 at 08:12 UTC
Jump to comment: Most recent, Most recent file

Comments
Comment #1
drupaldrop commentedHello,
For now work on the below report , I will review the code and post the comments .
Error report : http://ventral.org/pareview/httpgitdrupalorgsandboxlolandese1675006git
Comment #2
lolandese commentedThanks for your quick reply.
Some things that are next:
Thanks again for your interest.
Comment #3
lolandese commentedLinks with info that probably should be applied to the code:
Comment #4
drupaldrop commented" Coder found 1 projects, 3 files, 2 critical warnings, 5 minor warnings, 0 warnings were flagged to be ignored "
Comment #5
lolandese commentedCoder set to "minor (most sensitive)" gives me:
"Coder found 1 projects, 3 files, 0 warnings were flagged to be ignored".
Did you grab the latest git? Please, add an attachment with the report you get.
I won't use a 'package' in the .info file:
A 'Configure' link will be added to the .info file on the next commit, to make the settings accessible from the modules overview page.
Thanks.
For anyone else doing a manual code review, there is likely improvement possible of the used regex (preg_replace_callback, line 82 of the module file) regarding nested elements. It consist of four parts (divided by '|') matching a rejected 'div', a selected 'span', a link with image or an image. Also the parsing goes in that order, making that a pattern inside an already found pattern gets ignored, to avoid floats inside floats.
Furthermore I haven't been able to split out and prepare the pattern parts of the regex separately (better for readability):
These are the reasons that the regex is still an ugly long line of code, but at least a working one. Any hints on how to handle this better are more than welcome.
I would also be grateful for some specific hints how to use an XML-parser instead of a regex for this case. It would allow to add a class to the existing element instead of wrapping it in a 'span'. I looked into it but couldn't form a clear idea on how to do that. Adding a dependency on the QueryPath module would be okay if that should be the way to go.
EDIT: I received some nice hints here.
Comment #6
lolandese commentedAfter some consideration using an XML-parser instead of a regex is a hard requirement to make this project a more serious one. It is more challenging to implement but I want to give it a try.
I'm leaving it in "needs review" status as the code is functional and think sufficient to judge if basic Drupal API proficiency is present.
Comment #7
sanchi.girotra commentedManual Review:
1.In .install file can use db_delete to delete all the variable starting with "autofloat_%".
2.In autofloat.admin, no need to write
autofloat_admin_settings_submit()asreturn system_settings_form($form);will accordingly save content in the variable table.3.In .module file
add this code in a function, can add in hook_init().
4.In .module file access argument "administer site configuration" doesn't fit in this scenario.
Comment #8
lolandese commentedCommitted suggestions of comments 3, 4 and 7. See CHANGELOG.txt for details.
Thanks for the reviews so far.
Comment #9
lolandese commentedComment #10
dwieeb commentedHi,
.tplfiles. Consider generalizing your CSS..installfile, consider using placeholders instead of variables. Even though those particular variables won't change, it's still inserting markup directly into the translatable string, and it's best to limit the amount of markup in the first parameter of t() functions. Use placeholders and the l() function instead..installfile, if you're going to edit the variable table directly when uninstalling, you should clear the variable cache like variable_del() does. Just put in:Comment #11
dwieeb commentedComment #12
lolandese commentedCommitted all suggestions of comment 10. See CHANGELOG.txt for details.
Thanks for again an excellent review.
P:S.: Letting go of #6 as hard requirement. Besides the mentioned performance concern and library dependency of using an XML-parser:
Comment #13
lord_of_freaks commentedHello
Review autofloat.admin.inc beacuse of drupal_set_message after return statement
...
IMHO #6 suggestion turn module code into "cleaner" code but i´m agree with @lolandese becuase it increment a lot the complexity.
Great job
Comment #14
lord_of_freaks commentedComment #15
lolandese commentedThe drupal_set_message() could indeed be removed because:
Committed. Thanks.
Comment #16
lord_of_freaks commentedComment #17
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 #18
lolandese commented.
Comment #18.0
lolandese commentedAdded "Reviews of other projects" section.
Comment #19
klausiThank you for your reviews. When finishing your review comment also set the issue status either to "needs work" (you found some problems with the project) or "reviewed & tested by the community" (you found no major flaws).
This looks like a duplicate of http://drupal.org/project/float_filter . Module duplication and fragmentation is a huge problem on drupal.org. We prefer collaboration over competition, so please open an issue in the float_filter issue queue to discuss this and what you would have to add. You should also get in contact with the maintainer(s) to work together on float_filter.
If that fails for whatever reason please get back to us and set this back to "needs review".
Comment #20
lolandese commentedRan into Float filter in search of the functionality, automatic floating of images, but it doesn't provide this. The sole aim of Float filter is to target inline styled elements with CSS. Making images float is still something that requires input from a user on each and every image through the GUI of a WYSIWYG editor or with HTML.
AutoFloat offers mainly a time-saver functionality by making images float automatically. Avoiding inline styling (not just detecting) is only a welcome side effect.
Comment #21
klausiHm ok, I think that might justify a different module. Please add the differences to float_filter to your project page.
manual review:
Although you should definitively fix those issues they are no blockers, so this looks RTBC. Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.
Comment #21.0
klausiMentioned project names instead of link url in "Reviews" section.
Comment #22
lolandese commentedCommitted all suggestions of comment #21. See CHANGELOG.txt for details.
Thanks for the review.
Comment #23
klausino objections for more than a week, so ...
Thanks for your contribution, lolandese!
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 #24
lolandese commentedThanks to all. I learned a lot. It's almost a pity you can only use the application process once. :)
My contribution efforts will remain patching, writing documentation and also reviewing from now on. Nevertheless it's nice having delivered a project that offers a functionality that is unique among 18,233 other modules.
Comment #25.0
(not verified) commentedAdded more reviews.
Comment #26
avpaderno