This project integrates with the Pingdom API, using the wsclient module.

Link to project page: https://www.drupal.org/sandbox/jbickar/2493775

Git repo link:

http://git.drupal.org/sandbox/jbickar/2493775.git

Git clone link:

git clone --branch 7.x-1.x http://git.drupal.org/sandbox/jbickar/2493775.git pingdom_api

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

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.

john bickar’s picture

Issue summary: View changes
sherakama’s picture

This looks like a great module. It works as designed, however, I think it is missing one critical function before it can be an 'api' module. You need the one generic function that allows a developer to get at any resource and method in pingdom's public api. Right now you are only supporting two methods of one resource. Further 'helper' or 'convenience' wrapper functions can be written later around the generic function for each resource but that takes time and can come in later versions.

john bickar’s picture

Assigned: Unassigned » john bickar

@sherakama, great suggestion, thanks. I will add that.

john bickar’s picture

Assigned: john bickar » Unassigned
Status: Needs work » Needs review

OK, I have added a new function, pingdom_api_rest_request($httpmethod, $method, $params = array(), $url_args = array()), and documented it in the README and on the project page.

Please review.

chenderson’s picture

Hi John,

I do not have a pingdom account so cannot test the functionality further without signup, however I looked over your code a little bit.

Automated Review

You have an issue with you README.txt. See http://pareview.sh/pareview/httpgitdrupalorgsandboxjbickar2493775git

Manual Review

Please add a git clone link like:

git clone --branch 7.x-1.x http://git.drupal.org/sandbox/jbickar/2493775.git pingdom_api

README.txt/README.md

Your README.txt does not quite follow the guidlines. See this template https://www.drupal.org/node/2181737

I think you also missed out a dependency for Http Client.

Coding style & Drupal API usage

Points 1 and 2 are only suggestions from me but I think point 3 would be a blocker.

1. You could include a configuration button on the module page by adding 'configure = admin/config/services/pingdomapi' in your .info file.

2. For the function pingdom_api_config_form($form, &$form_state) you can:

return system_settings_form($form);

This would mean you do not need the pingdom_api_config_form_submit() function. See https://api.drupal.org/api/drupal/modules!system!system.module/function/...

3. As you are creating variables you should remove them when your application is uninstalled. You can do this in a .install file and hook_uninstall() function.

john bickar’s picture

Assigned: Unassigned » john bickar
Status: Needs review » Needs work

@chenderson, thanks for that feedback.

I did get the warnings from pareview.sh about line length in the README but did not want to wrap the function examples. I'll have a look at the template you linked.

I did mean to add a hook_uninstall() but it slipped my mind. Will do.

john bickar’s picture

Issue summary: View changes
john bickar’s picture

Issue summary: View changes
john bickar’s picture

Assigned: john bickar » Unassigned
Status: Needs work » Needs review

Re: chenderson's comments in #6:

  1. Update README.txt to match formatting and line length guidelines - DONE
  2. Add git clone link in issue description - DONE
  3. Add configure = admin/config/services/pingdomapi line in .info file - DONE
  4. Simplify FAPI implementation by returning system_settings_form($form) - DONE
  5. Add implementation of hook_uninstall() - DONE
  6. Declare dependency on http_client - NOT DONE. http_client is a dependency of wsclient_rest, which is declared as a dependency in pingdom_api.info. It's my understanding that nested dependencies do not need to be declared. Please correct me if I'm wrong.
ajaynimbolkar’s picture

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

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.

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 / No: Does not follow] 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. (*)Remove include_once 'pingdom_api.features.inc'; in line 7 and include in .info file such as files[] = 'pingdom_api.features.inc'
  2. (*) Always create admin configuration page changes in new file such as pingdom_api.admin.inc file so that it will be easy to handle
  3. (*)write hook_help that gives information of module
  4. (*)What is used of hook_permission, I think this was not needed.
john bickar’s picture

Hi ajayNimbolkar, thanks for your review. Regarding your suggestions:

(*)Remove include_once 'pingdom_api.features.inc'; in line 7 and include in .info file such as files[] = 'pingdom_api.features.inc'

The files[] declaration in .info files is only for files that declare classes or interfaces. See https://www.drupal.org/node/542202#files. include_once 'pingdom_api.features.inc'; is how the code is exported from the Features module.

(*) Always create admin configuration page changes in new file such as pingdom_api.admin.inc file so that it will be easy to handle

It is conventional for standard Drupal hook implementations to be in the .module file. Some developers choose to use an admin.inc file, but that is purely developer choice.

(*)write hook_help that gives information of module

In my experience, hook_help() is difficult to write and maintain. The README.txt and the project page provides instructions to use the module; README.txt is available within a site by using the advanced_help module.

(*)What is used of hook_permission, I think this was not needed.

I built another module that implements the pingdom_api module (see this implementation as an example); the implementation of hook_permission() seemed to make more sense to live in pingdom_api, but I could be convinced otherwise.

john bickar’s picture

Added hook_help() implementation.

darol100’s picture

Status: Needs review » Reviewed & tested by the community

Automated Review

Pareview.sh does not show any errors. - http://pareview.sh/pareview/httpgitdrupalorgsandboxjbickar2493775git

Coder modules does not show any errors.

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 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 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. You should add information in your hook_help instead of providing a link to your README.txt

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.

I do not see any blocker. You have address the only thing that I believe that was a blocker, which are the comment from #6.

avpaderno’s picture

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

Thank you for your contribution!

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!

Thank you, 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 go also to the dedicated reviewer(s) as well.

Status: Fixed » Closed (fixed)

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

avpaderno’s picture