Heap Analytics module implements 3rd-party analytics from Heap. In addition to adding the tracking JS code to HTML header it also include features you will fing in Google Analytics module: include/exclude based on page, role and DoNotTrack support.

Link to sandbox:
https://www.drupal.org/sandbox/iztok/2406101

Clone:
git clone --branch 7.x-1.x Iztok@git.drupal.org:sandbox/Iztok/2406101.git

Manual reviews of other projects:

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/httpgitdrupalorgsandboxIztok2406101git

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.

Iztok’s picture

Status: Needs work » Needs review
paranojik’s picture

Status: Needs review » Reviewed & tested by the community

All looks good. The code conforms to coding standards, validation is in place, works as described.

Great contribution!
Thanks, Iztok!

alesr’s picture

Reviewed the code. Syntactically the code is fine. Complies with coding standards.
Semantically there could be some optimizations done for example returning boolan values in _heap_analytics_visibility_pages() function.
But RTBC from me too.

Iztok’s picture

Issue summary: View changes
Issue tags: +PAReview: review bonus
naveenvalecha’s picture

Automated Review

Review of the 7.x-1.x branch (commit 929d58e):

  • Coder Sniffer has found some issues with your code (please check the Drupal coding standards).

    <p></p>
    <p>FILE: /var/www/drupal-7-pareview/pareview_temp/heap_analytics.install<br>
    --------------------------------------------------------------------------------<br>
    FOUND 1 ERROR AFFECTING 1 LINE<br>
    --------------------------------------------------------------------------------<br>
     5 | ERROR | There must be exactly one blank line after the file comment<br>
    --------------------------------------------------------------------------------</p>
    

    Time: 110ms; Memory: 6Mb<br>
    
  • No automated test cases were found, did you consider writing Simpletests or PHPUnit tests? This is not a requirement but encouraged for professional software development.

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. You have to get a review bonus to get a review from me.

Source: http://pareview.sh/ - PAReview.sh online service

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/NO: Follows the guidelines for in-project documentation and/or the README Template.You need to add more information regarding the configuration section in the Readme file.
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
  1. heap_analytics_menu : We don't need to define menu type'type' => MENU_NORMAL_ITEM,, becauase if you not provide the type its by default is MENU_NORMAL_ITEM
  2. heap_analytics.module : heap_analytics_page_alter : Please specify in your readme & Project page if the heap_analytics_environment_id is not configured properly then the analytics will not display.
  3. heap_analytics_admin_settings_form_validate : Use element_validate_number instead.
  4. (+) heap_analytics_page_alter : In general, using #attached is preferred over drupal_add_css, drupal_add_js, and drupal_add_libray.
  5. _heap_analytics_visibility_header :
    function _heap_analytics_visibility_header($account) {
    
      if (($account->uid || variable_get('cache', 0) == 0) && variable_get('heap_analytics_privacy_donottrack', 1) && !empty($_SERVER['HTTP_DNT'])) {
        // Disable tracking if caching is disabled or a visitors is logged in and
        // have opted out from tracking via DNT (Do-Not-Track) header.
        return FALSE;
      }
    
      return TRUE;
    }
    

    Please specify on the project page as well.

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.

Not found any security issue,major api problem and licensing issue.So lets take a git admin 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.

klausi’s picture

Status: Reviewed & tested by the community » Fixed

Review of the 7.x-1.x branch (commit 929d58e):

  • Coder Sniffer has found some issues with your code (please check the Drupal coding standards).
    FILE: /home/klausi/pareview_temp/heap_analytics.install
    --------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    --------------------------------------------------------------------------------
     5 | ERROR | There must be exactly one blank line after the file comment
    --------------------------------------------------------------------------------
    
  • DrupalPractice has found some issues with your code, but could be false positives.
    FILE: /home/klausi/pareview_temp/heap_analytics.module
    --------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    --------------------------------------------------------------------------------
     7 | WARNING | @author tags are not usually used in Drupal, because over time
       |         | multiple contributors will touch the code anyway
    --------------------------------------------------------------------------------
    
  • No automated test cases were found, did you consider writing Simpletests or PHPUnit tests? This is not a requirement but encouraged for professional software development.

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. You have to get a review bonus to get a review from me.

manual review:

  1. heap_analytics_page_alter(): you are not altering things here, so you should use hook_page_build() instead. Or is there a specific reason why you use hook_page_alter()?
  2. heap_analytics_admin_settings_form_validate() can be removed if you use https://api.drupal.org/api/drupal/includes!form.inc/function/element_val... on https://api.drupal.org/api/drupal/developer!topics!forms_api_reference.h...
  3. use #attached on the $page render array as naveen said, see https://api.drupal.org/api/drupal/developer--topics--forms_api_reference...
  4. I guess the script snippet is third party code, but I think it is short enough so that we can allow direct inclusion.

No critical blockers, so ...

Thanks for your contribution, Iztok!

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.

Iztok’s picture

Thank you klausi for promotion.

Thank you paranojik, alesr and naveenvalecha for the review, much appreciated!

Status: Fixed » Closed (fixed)

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