Link to the sandbox page: 2391729
To clone the repository use:
git clone --branch 7.x-1.x http://git.drupal.org/sandbox/tortelduif/2391729.git commerce_sendcloud
Commerce sendcloud adds the sendcloud shipping service to commerce shipping.
It has some default settings for the user to enter like api key and secret.
It has some extra config for a testmode build in, but its not used yet due to api limitations.
The shipping module works like commerce flat rate module, but commerce sendcloud integrates this with the sendcloud api.
It offers a rules action to create a shipping label for an order.
The labels and tracking code are stored inside the order using the form api.
The module comes with an installation file that creates these fields.
The installation file also install one database to store the created sendcloud services.
The module comes with an uninstallation file that removes all of the above.
It is a drop in module, but it requires rules config like every shipping module.
The module has been tested with the latest version of commerce and commerce shipping.
The automated review test pareview.sh 2391729 comes out clean.
The code is written with PSR standards in mind.
Manual reviews of other projects
https://www.drupal.org/node/2053373
https://www.drupal.org/node/2310291
https://www.drupal.org/node/2348143
09/05/2016
https://www.drupal.org/node/2660126
https://www.drupal.org/node/2378799
https://www.drupal.org/node/2621380
Comment | File | Size | Author |
---|---|---|---|
#4 | sendCloud_config.png | 29.25 KB | arunmv |
#4 | sendCloud_add_Service.png | 43.9 KB | arunmv |
Comments
Comment #1
mayurjadhav CreditAttribution: mayurjadhav commentedHi Rob,
Thank you for your efforts, I did some manual review of the code however didn't install it yet. Please find my comments:
Automated Review
Review of the 7.x-1.x branch (commit b1f6510):
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
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.
Comment #2
harings_rob CreditAttribution: harings_rob commentedHi,
By adding check_plain on the #default_value I receive a pareview automated review error. I left it out for now as it should sanitize by default. If needed I can readd.
All other issues have been resolved.
Comment #3
mayurjadhav CreditAttribution: mayurjadhav commentedGreat, you need to get the review bonus for further review of your module by community members,
see https://www.drupal.org/node/1975228
Comment #4
arunmv CreditAttribution: arunmv commentedHi Rob,
I downloaded and installed this module and got the below issues.
First Issue
======
1. Go to the url '/admin/commerce/config/shipping/services/sendcloud-shipping-method/add'.
2. I got one warning and one notice .See attached screenshot 'sendCloud_add_Service.png'.
Second Issue
========
1. Go to '/admin/commerce/config/shipping/sendcloud'.
2. I got one warning. See attached screenshot 'sendCloud_config.png'.
Solution: Check array count of 'commerce_sendcloud_shipping_methods' before executing loop in line 130 of 'commerce_sendcloud.admin.inc'. The variable $methods should be declared to handle null result.
Please fix these issues.
Comment #5
harings_rob CreditAttribution: harings_rob commentedHi,
Thank you for taking the time to review this module.
I have resolved the issues.
First issue: wrapped in a try/catch and watchdog logging.
Second issue: Added an if statement to check if we receive data or false.
Comment #6
piyuesh23 CreditAttribution: piyuesh23 commentedCongrats! Some minors that are ready to go .I would suggest you to take Review bonus to get the reviews from the Git administers.
Manual Review :
1)
commerce_sendcloud.install : commerce_sendcloud_uninstall : @typo "Delte"
2)
you can pass the "administer sendcloud settings" directly as the "access argument" .
I have done the review of the visual review of the code.
I am not a git admin.I would encourage you to get "Review bonus" to get the review from the git administer.
Comment #7
harings_rob CreditAttribution: harings_rob commentedHi,
I have updated the 2 issues you posted.
I'll do my best to get a review bonus.
Comment #8
waspper CreditAttribution: waspper commentedI reviewed the module:
Line 348:
Line 423:
Line 433:
Have you considered using entity_metadata_wrapper? There is a method "set()->".
Comment #9
harings_rob CreditAttribution: harings_rob commentedCan this module be upgraded?
Users are waiting for a full release.
Code is running stable.
Comment #10
harings_rob CreditAttribution: harings_rob commentedComment #11
klausimanual review:
watchdog('SendCloud', 'Error when creating parcel: <pre>' . $e . '</pre>',...
": do not concatenate variables into translatable watchdog() messages, use placeholders instead. See https://www.drupal.org/node/28984 . Same for: "watchdog('SendCloud Exception', $e, ...", the message should never be a dynamic variable.So the wrong watchdog() calls are blockers right now, since you can get XSS security issues easily if you don't use placeholders. Please check all your watchdog() calls, the second parameter should always be a static string with placeholders. Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.
Comment #12
harings_rob CreditAttribution: harings_rob commentedThank you for your review klausi,
I have fixed most of the issues and updated my module page description.
Point 4: Simplified the permissions.
Point 5: Not sure why I used this. Seems no need for it so I left it out.
However at point 9 I have a question.
Should I replace:
with:
Or what is the best way to handle this?
Waiting for your reply to place back in needs review.
Comment #13
harings_rob CreditAttribution: harings_rob commentedPlacing back to "needs review"
Comment #14
pfrenssenFunctional test
Note that my experience with Drupal Commerce is very limited. Some of these remarks might be due to how Commerce operates and are perhaps no fault of the module. I enabled the module and its dependencies on a clean Drupal instance with the standard install profile.
Code review
The code looks pretty good. Solid work! I have only some very minor remarks.
commerce_sendcloud_service_delete_page()
andcommerce_sendcloud_service_edit_page()
. You are correct, just usedrupal_get_form()
as the callback and pass the arguments in thepage_arguments
. That should do the trick.Conclusion
The goal of the project review is to assess whether a developer is able to deliver good quality modules, following Drupal best practices and coding standards. From the code I can clearly see that this is written by an experienced Drupal developer. The code is well structured, well written and follows coding standards to the letter.
The issues I found are all minor and are fine to be fixed in subsequent beta releases. For me this is OK to be approved as a full project. Setting to RTBC.
Comment #15
harings_rob CreditAttribution: harings_rob commentedComment #16
klausiReverted weird changes pfrenssen did in the issue summary.
Comment #17
klausimanual review:
watchdog('commerce_sendcloud_rate', 'Deleted sendcloud service <em>%title</em>.' ...
: The em tags are wrong here since the % placeholder will already use them. See https://api.drupal.org/api/drupal/includes!bootstrap.inc/function/format...Otherwise looks good to me.
Thanks for your contribution, Rob!
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.
Comment #18
pfrenssenI had some assistance from the hilarious Cloud to Butt Plus Chrome extension. It is mainly intended for random giggles during the work day but(t) sometimes there are some unexpected casualties :D
Comment #20
apaderno