Project Page: https://www.drupal.org/sandbox/kala4ek/2457853
Git: git clone --branch 7.x-1.x http://git.drupal.org/sandbox/kala4ek/2457853.git

1. Install as usual, see http://drupal.org/node/70151 for further information.
2. Download and install query.growl library, also you need to update jQuery to 1.7 version.
3. Go to the configure page and select comfortable for you way of notifications.
4. You can configure the plugin(Growl) at your convenience.

If you prefer the system notification, you should use Linux, install notify-send (libnotify-bin) package and give to your web serves's user access to use it.

Add the following string to end of /etc/sudoers file. Instead "www-data" you should use username of you web-server user.
www-data ALL=(ALL) NOPASSWD: /usr/bin/notify-send

Contact me with any questions.

My reviews:

CommentFileSizeAuthor
#25 coder-results.txt1.05 KBklausi
#19 Selection_071.png33.84 KBwebcodin
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

kala4ek’s picture

Issue summary: View changes
kunalkursija’s picture

Hi,

Your git clone url is incorrect. You have shared the git maintainer clone URL. Kindly correct the same so we can review.

kala4ek’s picture

Issue summary: View changes

Sorry, updated git url.

mparker17’s picture

Status: Needs review » Needs work

A brief read through your code looks good!

The Automated project review for your project revealed some issues:

  • You need to set the default branch to 7.x-1.x.
  • The code style sniffer found 8 errors and 2 warnings affecting 10 lines.
    • 2 errors are because you passed a variable or the result of a function to t(), which introduces an XSS security problem and confuses the Translation Template Extractor.
      To fix the error on line 84, you can simply remove the call to the t() function, because strings passed to watchdog() are translated when they're displayed, not when they're stored — see the documentation on the watchdog() function's $message parameter for more and dblog_overview() for more information.
      To fix the error on line 181, you can simply remove the call to the t() function, because constant names are the same in every language.
    • 6 errors are related to conforming to Drupal documentation standards (you're supposed to put a new line between @return and the return type in a docblock).
  • The Drupal best practices sniffer found 3 warnings affecting 3 lines. They all appear to be related to using drupal_add_css() or drupal_add_js() inside hook_init(), which is discouraged for performance reasons, and because Drupal also outputs JavaScript, RSS, etc. which you cannot embed CSS/JS into. I think you can move the code into hook_page_build() instead.

Hope this helps :) Good luck!

kala4ek’s picture

Status: Needs work » Needs review

Hi, thanks for review. The default branch is setted to 7.x-1.x.

I know that log messages are translated when they displayed, that's why I used t() function.

Also I can't use hook_page_builde(), because it will not work with Panels everywhere module.

PA robot’s picture

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.

kala4ek’s picture

@mparker17, sorry, you are right about hook_page_build().
Fixed.

kala4ek’s picture

Issue summary: View changes
kala4ek’s picture

Issue summary: View changes
hussainweb’s picture

Status: Needs review » Needs work

I am not very sure if you can include jquery.growl in the package. I can't say if the license is conflicting with GPLv2. Do you think it would be safer to not package it and use libraries?

#growls {
  z-index: 50000;
  position: fixed;
}

This and many other blocks is using CSS id. This would make it very difficult for themers to override the style. Is it possible to use classes here?

t('Duration display notices on the screen.<br />Ignoring this options if "Static" was checked.')

Instead of saying this, how about using Form States API to hide the text field.

In README.txt:

Contents:
=========
1. ABOUT
3. INSTALLATION
5. CREDITS

You should add a sequence.

Also, from the code, it is clear the module works only on *nix systems (maybe Mac, but not sure). But I can't find this in the README file. I think you should document this. In fact, I would even go as far as suggesting to add a hook_requirements() for this.

I have set it to Needs work for all this. If you think it doesn't warrant, feel free to change it back.

kala4ek’s picture

Status: Needs work » Needs review

About jQuery Growl library, the author use his own license, and says that we can "copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software..." it. The only condition is that we should include the copyright to libraries files. So it's done.

About library CSS, I think that other themes shouldn't influense to notifications from this module, it's only fo developers and I suggest to disable this module at production.

Duration field and Form States API. You are totally right, fixed.

README file. The module works not only on *nix systems, it works with any system via browser jQuery Growl library. *nix system needs only if user choosen the "system" way of notification.
But I updated the README.txt file

Thanks a lot for review.

hussainweb’s picture

@kala4ek: I can't find the license for the plugin in the repository. This is why there was a confusion because the module can't be packaged with another license -- hence the libraries suggestion.

This is the extract from the license. I couldn't find the notice in the repository anywhere.

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
klausi’s picture

Status: Needs review » Needs work
PAReview: 3rd party code
jquery.growl.js appears to be 3rd party code. 3rd party code is not generally allowed on Drupal.org and should be deleted. This policy is described in the getting involved handbook. It also appears in the terms and conditions you agreed to when you signed up for Git access, which you may want to re-read, to be sure you're not violating other terms.

The Libraries API module is a recommended method for adding 3rd party dependencies without directly including the code on Drupal.org.

kala4ek’s picture

Issue summary: View changes
kala4ek’s picture

Status: Needs work » Needs review

Hi @klausi.

Module is updated, I'm added integration with Libraries API module, implement a hook_requirements().
Module Libraries API wasn't added into dependencies because it (Notify log) can work via system without any jQuery plugins.

kala4ek’s picture

Issue summary: View changes
Issue tags: +PAreview: review bonus
eugene.ilyin’s picture

I tried this module on current project and it's very helpful. I can easy know about all PHP notices, even for ajax requests.

kala4ek’s picture

Issue summary: View changes
webcodin’s picture

Status: Needs review » Needs work
FileSize
33.84 KB

Hi kala4ek,
Handle Review

  • When you go to '/admin/config/development/notify-log' after install of module option 'Browser (Growl)' is disabled but chosen, it is not logical. Provided that the library 'jquery.growl' is not installed!
  • If uninstall module you will have 3 notice see Selection_071.png. As result settings variables still exist after module deleted.
kala4ek’s picture

Status: Needs work » Needs review

@webcodin, thanks man. Fixed.

kala4ek’s picture

Issue summary: View changes
kala4ek’s picture

Issue summary: View changes
Samvel’s picture

Status: Needs review » Reviewed & tested by the community

Hello kala4ek,

I used your module and it works fine, i hope that you will continue work on it and will implement many features.

Two recommendations from me:
1) Please change $static variable name in notify_log_js_settings function. It's confuse me, such variable names usually used for static variables.
2) Not use notify_log_access function, use user_access instead, because user_access already have static.

Looks like RTBC for me

kala4ek’s picture

@Samvel, thanks for feedback.

I hope that this module will help you with development :)

Your suggestions was applied.

klausi’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: -PAreview: review bonus
FileSize
1.05 KB

Review of the 7.x-1.x branch (commit 8445cf6):

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. project page is a bit short, please follow the instructions at https://www.drupal.org/node/997024
  2. notify_log_watchdog(): exec(): Warning: When allowing user-supplied data to be passed to this function, use escapeshellarg() or escapeshellcmd() to ensure that users cannot trick the system into executing arbitrary commands. From http://php.net/manual/en/function.exec.php . An attacker would need the "administer site configuration" permission which is for trusted users only to insert a malicious user name for example, but this should still be fixed and is a security threat.
  3. "'#title' => 'Growl settings',": all user facing text must run through t() for translation, make sure to check all your strings.

Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.

kala4ek’s picture

@klausi, thanks for review.
All issues were fixed, recheck please :)

kala4ek’s picture

Status: Needs work » Needs review
kala4ek’s picture

Issue summary: View changes
kala4ek’s picture

Issue summary: View changes
Issue tags: +PAreview: review bonus
zbombicz’s picture

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
No: Does not follow 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
  1. Just a recommendation: Use hook_help for including your readme file into drupal UI: https://www.drupal.org/node/161085#hook_help
  2. Just a recommendation: Add Requirements section to readme file. The requirements section (required) shall make it clear whether this project requires anything outside of Drupal core to work (modules, libraries, etc).
  3. Just a recommendation: Why is it neccessary to use html code in your field descriptions?
        $form['notify_log_type']['#description'] .= t(
          '<br />"Browser" way will be available only after installation the !link library.',
          array('!link' => l(t('jQuery Growl'), $library['download url']))
        );
    

    . I suggest to take out new line html code from t function like:

        $form['notify_log_type']['#description'] .= '<br />' . t('"Browser" way will be available only after installation the !link library.',
          array('!link' => l(t('jQuery Growl'), $library['download url']))
        );

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.

kala4ek’s picture

Hey @zbombicz, thanks a lot for review.

I have implemented your recommendations.

RavindraSingh’s picture

aha, good to see this functionality, just gone through the manual review first and found these things needs to be updated.

in notify_log.js
Drupal.settings.notifyLog = undefined; // Use single quote

2nd there re few minor things are still remaining, please remove them as well.

Review of the 7.x-1.x branch (commit 2954e63):

Coder Sniffer has found some issues with your code (please check the Drupal coding standards).
FILE: /var/www/drupal-7-pareview/pareview_temp/notify_log.module
---------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
---------------------------------------------------------------------------
144 | WARNING | Line exceeds 80 characters; contains 102 characters
164 | WARNING | Only string literals should be passed to t() where
| | possible
281 | WARNING | Only string literals should be passed to t() where
| | possible
---------------------------------------------------------------------------

Time: 211ms; Memory: 10.25Mb

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
RavindraSingh’s picture

Status: Needs review » Needs work
kala4ek’s picture

Status: Needs work » Needs review

@RavindraSingh thanks for review.

in notify_log.js
Drupal.settings.notifyLog = undefined; // Use single quote

I'm sure about what line you are talk:
if it's about 13 - changed :)
but if it's about 17 - I use undefined without quotes, because I want to set var as undefined, but not make it string var with value 'undefined'.

About pareview issues:
144 - I can short the line to 80 chars, but readability of code, will decrease, so, I think it doesn't important;
164/281 - did you checked these line manually? I have no way to use literal strings here.

klausi’s picture

Assigned: Unassigned » dman
Status: Needs review » Reviewed & tested by the community

manual review:

  • notify_log_system_capability(): why do you suppress PHP warnings here with the "@" operator? Please add a comment.

Otherwise looks good to me.

Assigning to dman as he might have time to take a final look at this.

kala4ek’s picture

@klausi,

You are right, removed @.
Also fixed some typos and change numbers to constants.

klausi’s picture

Assigned: dman » Unassigned
Status: Reviewed & tested by the community » Fixed

no objections for more than a week, so ...

Thanks for your contribution, kala4ek!

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.

kala4ek’s picture

Status: Fixed » Closed (fixed)

Cool, thanks klausi and all other who helped me with it.

klausi’s picture

Status: Closed (fixed) » Fixed

Just leave it at "fixed", it will close automatically after 2 weeks.

Status: Fixed » Closed (fixed)

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