Bean Tax (short for Bean Taxonomy) is a library of bean plugins that relate to taxonomy.

Right now there is only 1 plugin, a block template for relevant content.

  • Choose a range of content types and taxonomy vocabularies.
  • Results are sorted by relevance (number of matching terms).
  • Select which node view mode to use for results display.
  • Define a set number of results shown (defaults to 5).
  • Optional "More link" can be appended to the bottom of the bean.

Sandbox: http://drupal.org/sandbox/brantwynn/1376658
Git: git clone --branch 7.x-1.x-dev http://git.drupal.org/sandbox/brantwynn/1376658.git

Project Reviews:
http://drupal.org/node/1556812#comment-5967084
http://drupal.org/node/1590252#comment-6017412
http://drupal.org/node/1576090#comment-6017520

CommentFileSizeAuthor
#11 drupalcs-result.txt1 KBklausi

Comments

thomasdegraaff’s picture

Status: Needs review » Needs work

Review of the 7.x-1.x-dev branch:

  • Run coder to check your style, some issues were found (please check the Drupal coding standards):
    Severity minor, Drupal Commenting Standards, Internationalization, Drupal Security Checks, Drupal SQL Standards, Drupal Coding Standards
    
    sites/all/modules/pareview_temp/test_candidate/bean_tax.module:
     +2: [minor] There should be no trailing spaces
     +3: [minor] There should be no trailing spaces
     +7: [minor] There should be no trailing spaces
     +8: [minor] Format should be * Implements hook_foo().
     +8: [minor] There should be no trailing spaces
     +9: [minor] There should be no trailing spaces
     +10: [minor] There should be no trailing spaces
     +11: [minor] There should be no trailing spaces
     +13: [minor] There should be no trailing spaces
     +87: [minor] Use an indent of 2 spaces, with no tabs
    
    Status Messages:
     Coder found 1 projects, 1 files, 10 minor warnings, 0 warnings were flagged to be ignored
    
  • Lines in README.txt should not exceed 80 characters, see the guidelines for in-project documentation.
  • "plugins/bean/bean_tax.relevant.inc" in bean_tax.info: It's only necessary to declare files[] if they declare a class or interface.
  • "bean_tax.theme.inc" in bean_tax.info: It's only necessary to declare files[] if they declare a class or interface.
  • ./bean_tax.module: all functions should be prefixed with your module/theme name to avoid name clashes. See http://drupal.org/node/318#naming
    function get_node_terms($node) {
    function cmp($a, $b) {
    
  • All text files should end in a single newline (\n). See http://drupal.org/node/318#indenting
    ./bean_tax.module
    

This automated report was generated with PAReview.sh, your friendly project application review script. Go and review some other project applications, so we can get back to yours sooner.

saltednut’s picture

Status: Needs work » Needs review

I have run the code through ventral.org/pareview and coder module - updated accordingly.

Notes:
"plugins/bean/bean_tax.relevant.inc" in bean_tax.info: It's only necessary to declare files[] if they declare a class or interface.
- This file declares a class.

saltednut’s picture

Issue summary: View changes

Minor revisions to functionality.

patrickd’s picture

Status: Needs review » Needs work

Your not working correctly with branch names, so you'll not be able to create a release. For additional resources please see the documentation about release naming conventions.

Your README.txt is not very informative, what about installation / configuration instructions? you got a plugin system but no documentation about it?

Your .install is empty, remove stuff you don't need.

The bean_tax.relevant.inc plugin got lots of lines but only a few comments. How should we understand what you're doing here? Please tell us your thoughts by commenting. Don't be afraid, there is no "too much" commenting - if there is something to say, say it ;-)

Further reviews will follow after you fixed these issues and enhanced your code documentation.

regards

saltednut’s picture

Status: Needs work » Needs review

Hi patrickd, thanks for reviewing the module.

Your not working correctly with branch names, so you'll not be able to create a release. For additional resources please see the documentation about release naming conventions.

I have added a tag for 7.x-1.x-dev - my most recent push should be following this proper structure. Let me know if I am still doing anything wrong.

Your README.txt is not very informative, what about installation / configuration instructions? you got a plugin system but no documentation about it?

I have added some directions to the readme. The plugin folder is per the bean plugin documentation: http://drupal.org/project/bean_examples - this module is a bean plugin. Its not a plugin system for my module, but the module itself is a bean plugin and it requires the block type includes to be sorted in a plugins folder.

Your .install is empty, remove stuff you don't need.

I have removed the .install file as it is not being used.

The bean_tax.relevant.inc plugin got lots of lines but only a few comments. How should we understand what you're doing here? Please tell us your thoughts by commenting. Don't be afraid, there is no "too much" commenting - if there is something to say, say it ;-)

I have added thorough code comments to the bean_tax.relevant.inc file - let me know if anything is unclear.

Also, I will be in San Diego during SANDcamp if anyone would like to do a BOF to talk about Bean plugin modules, this module, or the examples modules. I will also be doing a presentation on writing bean plugins.

Thanks again!

camdarley’s picture

Hi brantwynn,
Actually, your branch name is wrong.
As you can see in the documentation about release naming conventions, the branch name should be "7.x-1.x" (and you can add "7.x-1.x-dev release" to the branch description.
I know it's a little confusing, i made the same mistake sooner.

You can check your naming convention by testing your code here: http://ventral.org/pareview/httpgitdrupalorgsandboxbrantwynn1376658git

There's also a warning with your README.txt:

FILE: ...al-7-pareview/sites/all/modules/pareview_temp/test_candidate/README.txt
--------------------------------------------------------------------------------
FOUND 0 ERROR(S) AND 1 WARNING(S) AFFECTING 1 LINE(S)
--------------------------------------------------------------------------------
 2 | WARNING | Line exceeds 80 characters; contains 88 characters
--------------------------------------------------------------------------------

Regards

camdarley’s picture

Status: Needs review » Needs work
saltednut’s picture

Status: Needs work » Needs review

Hi camdarley

Thanks for taking a look at this. I have updated the branches accordingly. I have also fixed some issues with the comments on the module.

patrickd’s picture

Sorry for the long delay!

  1. Please take a moment to make your project page follow tips for a great project page.
  2. Always use TRUE and FALSE for booleans (eg. '#tree' => 1,)
  3. Isn't it possible to work with drupal_add_js setting option instead of doing this raw stuff for the cycle settings?
  4. Prefix all your constants with the full module name
  5. drupal_get_path('module', 'bean_tax') you already know where you are, dirname(__FILE__) would do the same job with less work ;)

That's all what catched my eyes, as I got no idea about the bean module and it's proper usage, so have to stop here.

We do really need more hands in the application queue and highly recommend to get a review bonus so we will(/can) come back to your application sooner.

saltednut’s picture

Issue summary: View changes

Clarification.

saltednut’s picture

1. Please take a moment to make your project page follow tips for a great project page.
-- Currently in the process of rewriting the project page. I have already made some improvements: http://drupal.org/sandbox/brantwynn/1376658

2. Always use TRUE and FALSE for booleans (eg. '#tree' => 1,)
-- Cool, this is fixed.

3. Isn't it possible to work with drupal_add_js setting option instead of doing this raw stuff for the cycle settings?
-- I was very much not liking this style of cycle implementation anyway as it seemed hack-ish. I have decided to take a different approach for applying cycle (doing so on a view-mode level) and have removed all the javascript from this module.

4. Prefix all your constants with the full module name
-- Constants no longer used here, but I'll note to do this from now on.

5. drupal_get_path('module', 'bean_tax') you already know where you are, dirname(__FILE__) would do the same job with less work ;)
-- I have had trouble using this in some environments when PHP was not configured correctly.
-- http://drupal.org/node/304255 <-- this is where I was referencing the drupal_get_path method.
-- In any case, I am no longer needed to do this because not using JS for the project.

Thanks to everyone involved for reviewing, I will be reviewing projects as much as I can.

Project Reviews:
http://drupal.org/node/1556812#comment-5967084
http://drupal.org/node/1590252#comment-6017412
http://drupal.org/node/1576090#comment-6017520

saltednut’s picture

Issue tags: +PAreview: review bonus

Major revisions and screenshots added on the project page.

http://drupal.org/sandbox/brantwynn/1376658

Applying for review bonus.

klausi’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -PAreview: review bonus
StatusFileSize
new1 KB

Thank 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 flaws). Also please add your reviews to the issue summary.

Review of the 7.x-1.x branch:

This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. Get a review bonus and we will come back to your application sooner.

manual review:

  1. bean_tax_setting_is_numeric(): if you are not using any HTML in variables for t() you should use the "@" placeholder per default instead of "!".
  2. "if (!$records_shown = $bean->settings['records_shown']) {": you should use !isset() instead, no? Otherwise you will get PHP notices if bean->settings['records_shown'] is not set.
  3. TaxRelatedBean::view(): $node is not defined, so isset($node) will always be FALSE.
  4. "$content['#markup'] = 'No Results';": all user facing text must run through t() for translation.

But that are just minor issues, otherwise looks RTBC to me. Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.

klausi’s picture

Issue summary: View changes

Updated for current implementation that does not include cycle.js

saltednut’s picture

Thank you for your review, klausi. I have addressed the issues noted by PAReview.sh as well as your manual review.

see: http://drupalcode.org/sandbox/brantwynn/1376658.git/commit/be53e34

Edit: There was one issue that could be cleaned up further...

TaxRelatedBean::values(): This is where default values are set. So "if (!$records_shown = $bean->settings['records_shown']) {" was completely unnecessary. I removed these if statements and local variables. I can use $bean->settings['records_shown'] - it will always be set by the Bean API, either with the default TaxRelatedBean::values() or the stored value from the bean table.

see: http://drupalcode.org/sandbox/brantwynn/1376658.git/commit/ec34045

patrickd’s picture

Status: Reviewed & tested by the community » Fixed

I don't know if this is an issue of your module or of beans: I can put whatever kind of html into the block title.
As only administrative users can edit these block titles it's not a real security issue, however it's an unnecessary risk (IMHO).

Thanks for your contribution and welcome to the community of project contributors on drupal.org!

I've granted you the git vetted user role which will let you promote this to a full project and also create new projects as either sandbox or "full" projects depending on which you feel is best.

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.

As you continue to work on your module, keep in mind: Commit messages - providing history and credit and Release naming conventions.

Thanks to the dedicated reviewer(s) as well.

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

added project reviews