This module provides a simple block to gather feedback from the user.
While there are other modules to gather feedback from the user, this module has a significantly different layout and functionality.

The provided block will display a simple yes/no radio button with a question if the information on the website was useful. Upon selection of the radio button a section with a text area will expand, so the user can leave additional feedback.

Features:
* The text above and below the comments area can be customized in the configuration page for the block
* Email notification upon receipt of new feedback
* Customization of data displayed in the report of submitted feedbacks:
-- Name of User
-- Helpfulness Rating
-- Message
-- Base URL
-- System Path
-- Alias
-- Date
-- Time
-- Browser Info
* Integration with MOLLOM

The project page can be found here:
https://www.drupal.org/project/helpfulness

Comments

PA robot’s picture

Status: Needs review » Needs work

There are some errors reported by automated review tools, did you already check them? See http://pareview.sh/pareview/httpgitdrupalorgsandboxKoinseb2243485git

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.

PA robot’s picture

Status: Needs work » Closed (won't fix)

Closing due to lack of activity. If you are still working on this application, you should fix all known problems and then set the status to "Needs review". (See also the project application workflow).

I'm a robot and this is an automated message from Project Applications Scraper.

heymo’s picture

Status: Closed (won't fix) » Needs review
pushpinderchauhan’s picture

Status: Needs review » Needs work
Issue tags: +PAreview: security
StatusFileSize
new5.76 KB
new5.39 KB
new16.86 KB

@Koinseb, thankyou for your contribution.

Automated Review

Best practice issues identified by pareview.sh / drupalcs / coder. None.

Manual Review

Individual user account
Yes: Follows the guidelines for individual user accounts.
No duplication
Yes: Does not cause module duplication and fragmentation. Did not find any similar module that gives all these features, specifically integration with MOLLOM too.
Master Branch
Yes: Follows the guidelines for master branch.
Licensing
Yes: Follows the licensing requirements
3rd party code
Yes: Follows the guidelines for 3rd party code.
README.txt/README.md
Yes: Follows the guidelines for in-project documentation and the README Template.
Code long/complex enough for review
Yes: Follows the guidelines for project length and complexity.
Secure code
No. If "no", list security issues identified.
  1. (*) helpfulness_form: This is vulnerable to XSS exploits. If I enter <script>alert('XSS');</script> in the admin settings form, tested for helpfulness_yes_description and helpfulness_no_description elements, every time If I visit this Helpfulness form, get a nasty javascript popup. You need to sanitize this before rendering, make sure to read https://www.drupal.org/node/28984 again.


    XSS

    In given code helpfulness_yes_description and helpfulness_no_description variables coming form user provided input and you are directly rendering without sanitize that's why these popup coming. Also check the same for other places too in your code.

    $description = '<div class="helpfulness_yes_description">' . variable_get('helpfulness_yes_description', '') . '</div >';
      $description .= '<div class="helpfulness_no_description" > ' . variable_get('helpfulness_no_description', '') . '</div >';
    
      $form['helpfulness_comments'] = array(
        '#type'        => 'textarea',
        '#title'       => $title,
        '#description' => $description,
      );
    
Coding style & Drupal API usage
  1. (+) You are adding helpfulness.css through .info file. Due to this, it will added on all the pages rather use #attached to add the CSS file to the form render array or page render array where these actually required.
  2. Better to keep helpfulness_admin_form() in separate .inc file.
  3. (+) Extra <br /> is coming in settings form that need to be fix.

    br tag

    br tag
  4. (+) Instead of using date, better to use format_date().
  5. (+) helpfulness_get_report_form(): Why are you changing site timezone date_default_timezone_set("America/Detroit"); and why it require in your case please add your comment on this, if it is mandatory then better to use drupal_get_user_timezone
    first and then change or should use REQUEST_TIME. I don't think it is required in your case.
  6. Use Drupal.behaviors, not jQuery(document).ready() in your js file.
  7. Readme file, there are some special characters found Administration » Reports » Helpfulness Feedback messages.
  8. (+) helpfulness_get_confirm_form_description(): Use t() for concatenation and also check the same for other places too. Also try to wrap single line text using single t(). you can use placeholders to maintain dynamic values.
    $description = 'You are about to DELETE the ' . $count . ' feedback item';
      
      $description .= ' you had selected.<br /><br />';
      
      $option['uid'] = $feedback['uid'] . ' (' . $username . ')';
    
  9. helpfulness_form_submit(): Instead of using substr() better to use drupal_substr().

The starred items (*) are fairly big issues and warrant going back to Needs Work. Items marked with a plus sign (+) are important and should be addressed before a stable project release. The rest of the comments in the code walkthrough are recommendations.

Please don't remove the security tag, we keep that for statistics and to show examples of security problems.

As I am not a git administrator, so I would recommend you, please help to review other project applications to get a review bonus. This will put you on the high priority list, then git administrators will take a look at your project right away :-)

Thanks Again!

PA robot’s picture

Status: Needs work » Closed (won't fix)

Closing due to lack of activity. If you are still working on this application, you should fix all known problems and then set the status to "Needs review". (See also the project application workflow).

I'm a robot and this is an automated message from Project Applications Scraper.

heymo’s picture

Status: Closed (won't fix) » Needs review

@er.pushpinderrana: Thank you for your review, greatly appreciated. Your details have given me a great learning experience in the Drupal API system!

I believe to have addresses all issues you have mentioned, and have pushed all updates into the git repository.

A new review would be greatly appreciated.

Thanks again.

PA robot’s picture

Issue summary: View changes

Fixed the git clone URL in the issue summary for non-maintainer users.

I'm a robot and this is an automated message from Project Applications Scraper.

bren001’s picture

Automated Review

preview.sh has reported a number of errors:

helpfulness.js: line 6, col 2, Error - Use the function form of "use strict". (strict)

and a dozen other code formatting errors in the helpfulness.js file

Note that perfect adherence to Drupal Coding Standard is NOT a reason to block an application, except for total disregard of them. However, modules should follow them as closely as possible.

Manual Review

Individual user account
Yes: Follows the guidelines for individual user accounts.
No duplication
Yes: Does not cause module duplication and/or fragmentation.
Master Branch
Yes: Follows the guidelines for master branch.
Licensing
Yes: Follows the licensing requirements.
3rd party assets/code
Yes: Follows the guidelines for 3rd party assets/code.
README.txt/README.md
Yes: Follows the guidelines for in-project documentation and/or the README Template.
Code long/complex enough for review
Yes: Follows the guidelines for project length and complexity.
Secure code
Yes: Meets the security requirements.
Coding style & Drupal API usage
None, good to see that you've addressed those issues from the previous review.

If added, please don't remove the security tag, we keep that for statistics and to show examples of security problems.

This review uses the Project Application Review Template.

vgardner’s picture

Hey Koinseb,

- Remove your Drupal variables on an uninstall hookof your module.

- The .gitignore file committed in the module is unnecessary.

- Not a blocker but including your js and css files in a separate js and css folder provides a cleaner structure for your module.

- Include 'use strict' in your JS file.

- On the helpfulness_form_submit function, the items helpfulness_rating and helpfulness_comments are two items which are not required to be filled in. It's a good practice to always check if an element is set in the array before using it, specially multidimensional arrays. This avoid PHP warnings showing up.

Regards
Vin

heymo’s picture

Hi vgardner and bren001,

Thank you both for your feedback.
bren001: May I assume you meant to say pareview.sh instead of preview.sh? If not, could you give me a link to documentation or any other further information?

I believe to have addressed all issues you pointed out.

Regarding helpfulness_rating and helpfulness_comments:
- I decided to implement hook_form_validate to ensure that helpfulness_rating has been set
- I'm assigning a default value to helpfulness_comments if the user decided to not leave any comments. Hope that's an acceptable solution?

Thanks!

sandeep.kumbhatil’s picture

Automated Review

Formatting issues in js/helpfulness.js

Note that perfect adherence to Drupal Coding Standard is NOT a reason to block an application, except for total disregard of them. However, modules should follow them as closely as possible.

Manual Review

Individual user account
Yes: Follows the guidelines for individual user accounts.
No duplication
Yes: Does not cause module duplication and/or fragmentation.
Master Branch
Yes: Follows the guidelines for master branch.
Licensing
Yes: Follows the licensing requirements.
3rd party assets/code
Yes: Follows the guidelines for 3rd party assets/code.
README.txt/README.md
Yes: Follows the guidelines for in-project documentation and/or the README Template.
Code long/complex enough for review
Yes: Follows the guidelines for project length and complexity.
Secure code
Yes: Meets the security requirements.
Coding style & Drupal API usage
List of identified issues in no particular order. Use (*) and (+) to indicate an issue importance. Replace the text below by the issues themselves:
  1. Everything looks fine for me

The starred items (*) are fairly big issues and warrant going back to Needs Work. Items marked with a plus sign (+) are important and should be addressed before a stable project release. The rest of the comments in the code walkthrough are recommendations.

If added, please don't remove the security tag, we keep that for statistics and to show examples of security problems.

This review uses the Project Application Review Template.

liampower’s picture

Automated Review

[Best practice issues identified by pareview.sh / drupalcs / coder.] - As stated above there are some issues with the formatting of your javaScript which can be found here: http://pareview.sh/pareview/httpgitdrupalorgsandboxkoinseb2243485git

Note that perfect adherence to Drupal Coding Standard is NOT a reason to block an application, except for total disregard of them. However, modules should follow them as closely as possible.

Manual Review

Individual user account
[Yes: Follows] the guidelines for individual user accounts.
No duplication
[Yes: Does not cause] module duplication and/or fragmentation.
Master Branch
[Yes: Follows] the guidelines for master branch.
Licensing
[Yes: Follows] the licensing requirements.
3rd party assets/code
[Yes: Follows] the guidelines for 3rd party assets/code.
README.txt/README.md
[Yes: Follows] the guidelines for in-project documentation and/or the README Template.
Code long/complex enough for review
[Yes: Follows] the guidelines for project length and complexity.
Secure code
[Yes: Meets the security requirements. ]
Coding style & Drupal API usage
[List of identified issues in no particular order. Use (*) and (+) to indicate an issue importance. Replace the text below by the issues themselves:
  1. None

The starred items (*) are fairly big issues and warrant going back to Needs Work. Items marked with a plus sign (+) are important and should be addressed before a stable project release. The rest of the comments in the code walkthrough are recommendations.

If added, please don't remove the security tag, we keep that for statistics and to show examples of security problems.

This review uses the Project Application Review Template.

heymo’s picture

Not sure how the issue with the double/single quotes in the .js file slipped through last time, I don't think pareview.sh reported it. Is this something new?
In any case, should be fixed now.

I do however have a question regarding the application process:
It says in the issue queue handbook that I should not set the status to "Reviewed & Tested by the Community" by myself, however the last reviews said that issues with coding standards are NOT a reason to block an application.

How can this project be moved towards an accepted state, anything I can do?

Thank you all!

sandeep.kumbhatil’s picture

Status: Needs review » Reviewed & tested by the community

+1 RTBC, Changing status to RTBC.

damienmckenna’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for your contribution, Heymo!

I updated your account so you can 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 stay 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.

heymo’s picture

Great, thank you so much Damien!

heymo’s picture

Issue summary: View changes

Status: Fixed » Closed (fixed)

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