This is a companion module for Share Link. www.sharelink.com.au

Automatically manage the addition of ASX share price, commodity prices and ASX Announcements to your website via the Share Link Drupal module.

Share Link is a subscription service that includes the ability to display share prices, commodity prices, graphs and automatically upload ASX Announcements to your website.

We currently have a Wordpress version of the module. https://wordpress.org/plugins/share-link/
This is our Drupal Version

Current Project page
https://www.drupal.org/sandbox/harmonicnewmedia/2784655

 git clone --branch 7.x-1.x https://git.drupal.org/sandbox/harmonicnewmedia/2784655.git share_link
cd share_link 

Manual reviews of other projects

CommentFileSizeAuthor
#6 sandbox_project_form.png46.89 KBlionslair
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

lionslair created an issue. See original summary.

dilipsingh02’s picture

Status: Needs review » Needs work

Hi,

Please review the automated test error and fixed it.

http://pareview.sh/pareview/httpsgitdrupalorgsandboxharmonicnewmedia2784...

Also update the git clone URL with correct one.

Thanks
Dilip

lionslair’s picture

Issue summary: View changes
lionslair’s picture

Status: Needs work » Needs review

I have now made the changes requested.

I have run it through the automated coder testing locally.

I have set the default branch and updated the git url above.

I have also re-run the test from the link above. All that is left is some warnings for comments

http://pareview.sh/pareview/httpsgitdrupalorgsandboxharmonicnewmedia2784...

Just a question. After this is approved that is when we can set the short name for this project correct?

kamdanishit’s picture

Hi lionslair, what do you mean by short name?

lionslair’s picture

FileSize
46.89 KB

The short name field on the project page. See screenshot.

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.

visabhishek’s picture

Issue summary: View changes
dilipsingh02’s picture

Status: Needs review » Needs work

Hi,

DrupalPractice has found some issues with your code, please review following URL:

http://pareview.sh/pareview/httpsgitdrupalorgsandboxharmonicnewmedia2784...

Thanks

lionslair’s picture

Does that page need to be clear to pass? That is what I'm getting to understand.

benjy’s picture

Here's an initial review as requested.

  1. module_load_include('inc', 'sharelink', 'sharelink'); You shouldn't use this in a global context, simply require_once the files if they belong to your module.
  2. 'title' => t('Share Link'), - Don't use t() to translate title in hook menu.
  3. A few of your menu callbacks have access TRUE, you should add a basic access callback or permission of some kind.
  4. In sharelink_delete_multiple() i see you manually cleaning up files, if you had the correct file_usage entries i'd have expected those managed files to be cleaned up by Drupal?
  5. The formatting of many files such as sharelink.form.inc isn't inline with Drupal's formatting.
  6. Many of the functions are camel case such as _sharelinkGetAnnouncementsFromDatabase rather than Drupal's preferred sharelink_get_announcements_from_database
  7. There is a lot of HTML string building, i'd recommend trying to refactor into theme functions with corresponding templates where possible.
  8. $tz_perth = new DateTimeZone('Australia/Perth'); - Should this be picked up from the users/site timezone?
  9. if (isset($sharelink_settings['license_key']) && !empty($sharelink_settings['license_key'])) {
    if (isset($sharelink_settings['graph_range']) && !empty($sharelink_settings['graph_range'])) {
    if (isset($sharelink_settings['stock_code']) && !empty($sharelink_settings['stock_code'])) {
    

    empty() does an isset() check as well so the isset() call is redundant.

  10. $data = curl_exec($ch); - Consider using drupal_http_request()
  11. return 'http:'. SHARELINK_SOURCE . _sharelinkGetLicense() . "/announcements"; - Looks like this builds a http url with the license key included? Can you use https?
  12. In _sharelinkCreateUrlFriendlyFilename you are using _sharelinkShuffleString to md5 hash a part of the filename? Are you trying to hide something there, checkout drupal_hmac_base64() which is also URL safe.
  13.   if ($return !== false) {
        return $return;
      } else {
        return false;
      }
    

    This entire chunk be replaced with return $return; Although, looking at the code above, it's initialised to array() so I don't see how it would ever be false anyway.

lionslair’s picture

Status: Needs work » Needs review

I have now gone through and made a load of changes as suggested.

The check is now passing

http://pareview.sh/pareview/httpsgitdrupalorgsandboxharmonicnewmedia2784...

Here are the changes

  • Updated all the functions to confirm to Drupal naming conventions
  • Removed CURL command and used drupal_http_request
  • Switched to the users timezone instead of a hard coded timezone
  • Removed the author strings in doc blocks.
  • Converted true and false to TRUE and FALSE to match convention
  • Removed the t() from the hook_menu
  • Updated the hook_menu items to use access content as the permission check rather that access callback true
lionslair’s picture

Issue summary: View changes
Issue tags: +PAreview: review bonus
nhanlq@outlook.com’s picture

Hi lionslair

Automated Review

By PAReview.sh:
http://pareview.sh/pareview/httpsgitdrupalorgsandboxnisith2696411git

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: Follows the guidelines for in-project documentation

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

(+) Please add hook_help

(*) - I found some issue about translate in t():
some cases have t(), and some cases don't have t()

 $html = '<p>' . t('If you move servers or change domain names please !contact_us to organise an updated license key.', array('!contact_us' => l(t('contact us'), 'http://www.sharelink.com.au'))) . '</p>';

  if ($json === FALSE) {
    $html .= "<div>There was an error checking the license. Please try again later.</div>";
  } else {

    $stock_code = $json->symbol;

- Should use base_path() instead "/":

<img src="/<?php print drupal_get_path('module', 'sharelink'); ?>/images/sharelink_uninstall.png" alt="sharelink uninstall" />

  <p>Then go to the uninstall tab and continue to uninstall. This will remove all components of sharelink on your site.</p>
  <img src="/<?php print drupal_get_path('module', 'sharelink'); ?>/images/sharelink_uninstall_remove.png" alt="sharelink uninstall remove" />

you can use:

<img src="<?php print base_path(). drupal_get_path('module', 'sharelink'); ?>/images/sharelink_uninstall.png" alt="sharelink uninstall" />

  <p>Then go to the uninstall tab and continue to uninstall. This will remove all components of sharelink on your site.</p>
  <img src="<?php print base_path(). drupal_get_path('module', 'sharelink'); ?>/images/sharelink_uninstall_remove.png" alt="sharelink uninstall remove" />

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 walk through 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.

Thanks
Nhan

klausi’s picture

@mrken201016: looks like you forgot to change the status. Is this now RTBC after your review or are there application blockers left and this should be "needs work"?

nhanlq@outlook.com’s picture

Status: Needs review » Needs work
lionslair’s picture

Status: Needs work » Needs review

@mrken201016 I already have a hook_help in the module. It links to the detailed help page.

sharelink.module line 190

I have made the changes to the t() functions. I have also done some further standards changes. I have updated the README.txt to conform to the standards further.

nhanlq@outlook.com’s picture

Hi @lionslair

http://pareview.sh/pareview/httpsgitdrupalorgsandboxharmonicnewmedia2784...

EDIT: removed long pareview.sh dump.

Please fix code review firt

Thanks
Nhan

nhanlq@outlook.com’s picture

Status: Needs review » Needs work
klausi’s picture

@mrken201016: please don't post the full output of pareview.sh, it just clutters up the issue. A link is enough :)

lionslair’s picture

Status: Needs work » Needs review

I have now addressed all the issue in terms of code formatting and compliance.

http://pareview.sh/pareview/httpsgitdrupalorgsandboxharmonicnewmedia2784...

lionslair’s picture

Issue summary: View changes
3ssom’s picture

Hello lionslair,

Reviewers here have done great work ,, and you followed that so I'll do a review to see if this is a RTBC.

Automated Review

Nothing :)

Manual Review

Individual user account
[Yes: Follows] the guidelines for individual user accounts.
No duplication
[Yes:Does not causes] 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. / No: List of security issues identified.]
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:
    Have you considered renaming your project to something more specific? like ASX share link(ASX_share_link) it'd be better to know what the project is about? and what the share link about exactly even when users search for this in Drupal.
  1. you could use the (configure = path to your project's configuration page) in your info file which helps a lot using your module your path I think is (admin/config/sharelink)
  2. README file needs some enhancement .. I think Configuration section needs to be separated from Installation section which you dont have there.
  3. good job on writing rich help tpl :) ,, but you could put those phrases in t() .. it would be perfect :)

I see no blockers here so I think this is a RTBC :)

Thank you

3ssom’s picture

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

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

I will update 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 the dedicated reviewer(s) as well.

Status: Fixed » Closed (fixed)

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