UC Tracking Links is a module for Drupal 6 which provides shipment tracking links on the order page for Ubercart enabled e-commerce website.
When the user clicks on a link, the web browser navigates to the relative tracking page provided by the carrier for the shipment.

At the moment only SDA Express Courier italian carrier is supported, but it can be easily expanded to other carriers which provide a "simple" URL containing the tracking number to access to the relative informations.

This module doesn't retrieve shipping tracking information directly: it just connects the order page to the carrier portal where real-time data is visible. Nor it accesses carrier's server which require login account.
For those advanced functionality, consider the uc_tracking module instead.

Here's the link to the project page: http://drupal.org/sandbox/mandreato/1352282
(this is my first contrib module)

Comments

raynimmo’s picture

Status: Needs review » Needs work

Automated review
Please keep in mind that this is primarily a high level check that does not replace but eases the review process. There is no guarantee that no other issues could show up in a more in-depth manual follow-up review.

Drupal Code Sniffer has found some code style issues (please check the Drupal coding standards):

FILE: ...ites\default\modules\reviews\uc_tracking_links\uc_tracking_links.module
--------------------------------------------------------------------------------
FOUND 38 ERROR(S) AND 3 WARNING(S) AFFECTING 17 LINE(S)
--------------------------------------------------------------------------------
   1 | ERROR   | End of line character is invalid; expected "\n" but found
     |         | "\r\n"
   2 | ERROR   | Missing file doc comment
   3 | ERROR   | Missing function doc comment
   5 | WARNING | Line exceeds 80 characters; contains 100 characters
   5 | ERROR   | Inline comments must end in  full-stops, exclamation marks, or
     |         | question marks
   9 | ERROR   | Inline comments must end in  full-stops, exclamation marks, or
     |         | question marks
  26 | ERROR   | Line indented incorrectly; expected at least 4 spaces, found 2
  26 | ERROR   | Inline comments must start with a capital letter
  26 | ERROR   | Inline comments must end in  full-stops, exclamation marks, or
     |         | question marks
  30 | ERROR   | Line indented incorrectly; expected at least 4 spaces, found 2
  30 | ERROR   | Inline comments must start with a capital letter
  30 | ERROR   | Inline comments must end in  full-stops, exclamation marks, or
     |         | question marks
  34 | ERROR   | Line indented incorrectly; expected at least 6 spaces, found 4
  34 | ERROR   | Inline comments must start with a capital letter
  34 | ERROR   | Inline comments must end in  full-stops, exclamation marks, or
     |         | question marks
  39 | ERROR   | Line indented incorrectly; expected at least 8 spaces, found 4
  39 | ERROR   | Inline comments must start with a capital letter
  39 | ERROR   | Inline comments must end in  full-stops, exclamation marks, or
     |         | question marks
  47 | ERROR   | Line indented incorrectly; expected at least 4 spaces, found 2
  47 | ERROR   | Inline comments must start with a capital letter
  47 | ERROR   | Inline comments must end in  full-stops, exclamation marks, or
     |         | question marks
  65 | ERROR   | Line indented incorrectly; expected at least 6 spaces, found 4
  65 | ERROR   | Inline comments must start with a capital letter
  65 | ERROR   | Inline comments must end in  full-stops, exclamation marks, or
     |         | question marks
  78 | ERROR   | Line indented incorrectly; expected at least 6 spaces, found 4
  78 | ERROR   | Inline comments must start with a capital letter
  78 | ERROR   | Inline comments must end in  full-stops, exclamation marks, or
     |         | question marks
  93 | ERROR   | Line indented incorrectly; expected at least 12 spaces, found
     |         | 10
  93 | ERROR   | Inline comments must start with a capital letter
  93 | ERROR   | Inline comments must end in  full-stops, exclamation marks, or
     |         | question marks
  95 | WARNING | Line exceeds 80 characters; contains 87 characters
  95 | ERROR   | Line indented incorrectly; expected at least 14 spaces, found
     |         | 12
  95 | ERROR   | Inline comments must start with a capital letter
  95 | ERROR   | Inline comments must end in  full-stops, exclamation marks, or
     |         | question marks
 100 | WARNING | Line exceeds 80 characters; contains 113 characters
 100 | ERROR   | Line indented incorrectly; expected at least 14 spaces, found
     |         | 12
 100 | ERROR   | Inline comments must start with a capital letter
 105 | ERROR   | Line indented incorrectly; expected at least 12 spaces, found
     |         | 10
 105 | ERROR   | Inline comments must start with a capital letter
 105 | ERROR   | Inline comments must end in  full-stops, exclamation marks, or
     |         | question marks
 120 | ERROR   | Break statement indented incorrectly; expected 6 spaces, found
     |         | 4
--------------------------------------------------------------------------------

Manual Review

  • Please remove the LICENSE.txt file. Drupal will add the appropriate version automatically during packaging so your repository should not include it.
  • I'm not a fan of your style of commenting sections, in relation to lines 17,18 and 19 of uc_tracking_links.module; if you document functions clearly this is not required.

Code Reviews
When running the Coder module make sure that it is set to 'minor' and always try to use the latest development versions for up to date checks. There are also a host of optional add ons that run with Coder and help to spot errors in your code such as Coder Tough Love, the Translation Template Extractor and Text Review to name some of the more popular ones. There is also a really good script called PAReview.sh that does a great job of spotting errors, its still a sandbox project though so is liable to changes. Drupal Code Sniffer is also great at catching all sorts of errors within your code but can be a bit tricky to set up.

mandreato’s picture

Thanks raynimmo,

I did use the latest Coder module version before commiting, but no error was found.
Now I've tried your suggestions, but cannot get an automatic review like yours:
- installed Coder Tough Love, and enabled it on Coder defaults, but still no error is found
- on admin/settings/coder_tough_love it says "Pspell is not enabled, so there are no settings to configure", but Pspell is no more included on PHP since 5.3
- Drupal Code Sniffer is only for Drupal 7
- PAReview.sh require a bash, whilst I'm on a Windows box

By the way, I've fixed the issues you suggested and commited the changes on git.
Could you review the module please ?

mandreato’s picture

Status: Needs work » Needs review
raynimmo’s picture

RE:

PAReview.sh require a bash, whilst I'm on a Windows box

You can still get a Linux shell running on Windows. For git access I use msysgit which has a GUI and a shell environment. Personally I only use the shell environment.

It allows you full access to many 'Linux Tools' and the ability to run bash scripts, such as PAReview.sh.

Havent had a chance to check your code again, will try and revisit this later.

patrickd’s picture

btw: you can also use http://ventral.org/pareview - it is an online service providing pareview.sh tests

mandreato’s picture

Hi patrickd, visited your ventral.org this morning but believed it was for complete projects only.
Now I've tried it putting http://git.drupal.org/sandbox/mandreato/1352282.git and it works fine.
What a great resource for automated review !
I think it should be promoted on documentation of review process.

bailey86’s picture

Could you explain how your module provides something that uc_tracking does not?

mandreato’s picture

@bailey86, I explained it a bit on the README.txt: uc_tracking get real-time shipment tracking details by accessing into the carrier server with specific authentication. To reach that, it needs more specific definitions for every carrier.

Instead uc_tracking_links simply provide a link to the carrier tracking portal. No login, no data import, it just redirects the user to the place where to find informations about its shipment. It is also easier to expand the list of supported carriers.

raynimmo’s picture

Status: Needs review » Needs work

It seems that Patrickd's online reviewer actually has some issues with your code I am sorry to say. Dont worry though they are fairly minor points though.

Review of the 6.x-1.x branch:

  • Drupal Code Sniffer has found some code style issues (please check the Drupal coding standards):
    
    FILE: ...sites/all/modules/pareview_temp/test_candidate/uc_tracking_links.module
    --------------------------------------------------------------------------------
    FOUND 2 ERROR(S) AND 1 WARNING(S) AFFECTING 3 LINE(S)
    --------------------------------------------------------------------------------
       2 | ERROR   | You must use "/**" style comments for a file comment
      16 | WARNING | Line exceeds 80 characters; contains 81 characters
     139 | ERROR   | Inline comments must end in  full-stops, exclamation marks, or
         |         | question marks
    --------------------------------------------------------------------------------
    

This automated report was generated with PAReview.sh, your friendly project application review script. Go and review some other project applications, so we can get back to yours sooner.

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

mandreato’s picture

Status: Needs work » Needs review

Changes commited.

klausi’s picture

Status: Needs review » Needs work

There are still files other than README.txt in the master branch, make sure to remove them. See also step 5 in http://drupal.org/node/1127732
Review of the 6.x-1.x branch:

  • Drupal Code Sniffer has found some code style issues (please check the Drupal coding standards).
    
    FILE: ...sites/all/modules/pareview_temp/test_candidate/uc_tracking_links.module
    --------------------------------------------------------------------------------
    FOUND 1 ERROR(S) AFFECTING 1 LINE(S)
    --------------------------------------------------------------------------------
     40 | ERROR | Inline comments must end in  full-stops, exclamation marks, or
        |       | question marks
    --------------------------------------------------------------------------------
    

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. Go and review some other project applications, so we can get back to yours sooner.

manual review:

  • Please use real headings on your project page.
  • Please provide more useful Git commit messages. "Internal development" does not say anything. See also http://drupal.org//node/52287
  • uc_tracking_links_get_list_of_carriers(): I think you should provide your own hook, so that other modules can add additional carriers. module_invoke_all() is used to invoke hooks in other modules. And a uc_tracking_links.api.php would be nice if you provide that hook.
  • $arg1 is really a bad variable name. Use more self-explaining names as $order, $shipment etc.
  • uc_tracking_links_get_list_of_carriers(): strings passed to t() should be in English.
  • This project is too short to approve you as git vetted user. We are currently discussing how much code we need, but everything with less than 120 lines of code or less than 5 functions cannot be seriously reviewed. However, we can promote this single project manually to a full project if you wish.
mandreato’s picture

Status: Needs work » Needs review

Thanks klausi for the review !
I've done the following changes:
- better headings on project page
- better commit messages
- provided and documented a hook for list of carriers by using drupal_alter
- better variable names
- better use of t()
- added a new function to show the carrier name on the packing slip
- checked with online PAReview.sh

Hope this will be accepted as a complete module and me as git vetted user.

misc’s picture

Status: Needs review » Needs work

Hi,

You still have some small coding standards issues:

uc_tracking_links.module
--------------------------------------------------------------------------------
FOUND 12 ERROR(S) AFFECTING 6 LINE(S)
--------------------------------------------------------------------------------
20 | ERROR | Array indentation error, expected 4 spaces but found 6
20 | ERROR | Array closing indentation error, expected 4 spaces but found 6
25 | ERROR | Array indentation error, expected 4 spaces but found 6
25 | ERROR | Array closing indentation error, expected 4 spaces but found 6
30 | ERROR | Array indentation error, expected 4 spaces but found 6
30 | ERROR | Array closing indentation error, expected 4 spaces but found 6
34 | ERROR | Array indentation error, expected 4 spaces but found 6
34 | ERROR | Array closing indentation error, expected 4 spaces but found 6
39 | ERROR | Array indentation error, expected 4 spaces but found 6
39 | ERROR | Array closing indentation error, expected 4 spaces but found 6
44 | ERROR | Array indentation error, expected 4 spaces but found 6
44 | ERROR | Array closing indentation error, expected 4 spaces but found 6
--------------------------------------------------------------------------------
klausi’s picture

Status: Needs work » Needs review

Please do not switch issues to "needs work" without giving a manual review.

Get a review bonus and we will come back to your application sooner.

misc’s picture

I am only interesting in helping out, not to get any bonus, but I have missed the part that you should not change status after a automatic review, thought I read all the documentation about reviews, but must have missed that, sorry...

mandreato’s picture

Thanks MiSc for helping the community; I've fixed the small issues.

BTW, I submitted the last changes as of december the 23rd to Ventral automatic review tool and it didn't except any issue. Now I tried again after your advice and Ventral does show those cosmetic issues... Something must be changed on Drupal coding standards ;-).

BTW2, this module is in production on my website for a couple of months.

drupaledmonk’s picture

PAReview.sh doesn't show any errors.
I have done a manual review and it looks great. Maybe if you are open to any suggestions, you can extend the module to add the trackers and links through module administration, rather than harcoding / sub-modules.

mandreato’s picture

Hi f4k1r, thank you for manual review.
I think that it is simpler to ask for new tracking links via the issue queue than extending the module by adding a table, the logic to control, etc. By including them into the module, one can suggest a service and many can benefit. Especially when a link changes: the fix on the module propagates via update report to every installation.
Maybe it would be worth to do add a grouping functionality when the list will became very long.
And for specific settings, the sub-module remains a good alternative.

misc’s picture

I think this should be marked 'reviewed and tested by the community'. Anybody disagree? Another way to handle trackers could be added later on.

klausi’s picture

@f4k1r & @MiSc: don't hesitate to set the issue to RTBC if you think it is ready.

drupaledmonk’s picture

Status: Needs review » Reviewed & tested by the community
klausi’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for your contribution, mandreato! Welcome to the community of project contributors on drupal.org.

I've granted you the git vetted user role which will let you promote this to a full project and also create new projects as either sandbox or "full" projects depending on which you feel is best.

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.

As you continue to work on your module, keep in mind: Commit messages - providing history and credit and Release naming conventions.

mandreato’s picture

Thanks to everyone who is contributing to this wonderful community !

Status: Fixed » Closed (fixed)

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