Description
The LinkedIn Company API Suite is intended to be a addon suite of modules to the LinkedIn Integration module, and is intended to ecapsulate the functionality contained within the LinkedIn Company API.
It currently contains two modules
LinkedIn Company (linkedin_company)
This module creates the functionality to authenticate as an organization with LinkedIn. Unlike the LinkedIn module which forces users to authenticate at the individual profile level, this module adds button that allows an admin with access to the company profile to authenticate and generate an OAuth token specific to the company that works sitewide.
LinkedIn Company Shares (linkedin_company_shares)
This module pulls in the recent LinkedIn company shares and puts them into a themeable block. You can adjust the number of shares to show.
We intend to add additional modules in the future to support the other company API integrations such as jobs and product postings.
Project Page
https://www.drupal.org/sandbox/michaelhodgejr/2310985
Git Clone Command
git clone --branch 7.x-1.x http://git.drupal.org/sandbox/michaelhodgejr/2310985.git linkedin_company_api_suite
Automated Review Results
http://pareview.sh/pareview/httpgitdrupalorgsandboxmichaelhodgejr2310985git
Review Bonus
Here are my three peer module reviews:
Maintenance Exclude URLs: https://www.drupal.org/node/2312245#comment-9018301
Lesser Forms: https://www.drupal.org/node/2293613#comment-9018411
XML SiteMap Views: https://www.drupal.org/node/2282481#comment-9018497
and three other reviews for the secondary review bonus
Review #1 - https://www.drupal.org/node/2316587#comment-9043407
Review #2 - https://www.drupal.org/node/2312955#comment-9043505
Review #3 - https://www.drupal.org/node/2285195#comment-9043521
Comments
Comment #1
PA robot commentedProject 1: https://www.drupal.org/node/2313463
Project 2: https://www.drupal.org/node/2313465
As successful completion of the project application process results in the applicant being granted the 'Create Full Projects' permission, there is no need to take multiple applications through the process. Once the first application has been successfully approved, then the applicant can promote other projects without review. Because of this, posting multiple applications is not necessary, and results in additional workload for reviewers ... which in turn results in longer wait times for everyone in the queue. With this in mind, your secondary applications have been marked as 'closed(duplicate)', with only one application left open (chosen at random).
If you prefer that we proceed through this review process with a different application than the one which was left open, then feel free to close the 'open' application as a duplicate, and re-open one of the project applications which had been closed.
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #2
Michael Hodge Jr commentedMoving back to need review, since the other one was closed.
Comment #3
PA robot commentedWe 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.
Comment #4
Michael Hodge Jr commentedComment #5
Michael Hodge Jr commentedComment #6
pushpinderchauhan commented@Michael Hodge Jr, first of all thanks to you for contribution.
Automated Review
PAReview(http://pareview.sh/pareview/httpgitdrupalorgsandboxmichaelhodgejr2310985git) doesn't reported any issue in current build. Its good.
Manual Review
1. You have added
linkedin-company-shares.cssusinglinkedin_company_shares_init()that include this css on every page of site. I would recommend you to add this css using #attached, it would help you to add it specifically.2. Your module is little bit complex but missing hook_help() in both .module file. It would be better if you add this.
3. In one scenario I am getting following notice, please fix it.
Notice: Undefined index: error in linkedin_company_access_token() (line 179 of C:\xampp\htdocs\drupal730\sites\all\modules\2310985\linkedin_company.module).Rest looks good to me. Your project page and README.txt is well organised.
Good work @Michael Hodge Jr!
Comment #7
Michael Hodge Jr commentedThanks for the feedback I will make those changes.
Comment #8
Michael Hodge Jr commentedAlright, so I fixed the notice about the undefined index as well as removed hook_init() in linkedin_company_shares.module and added the CSS file via '#attached' in hook_block_view().
I also added hook_help for linkedin_company.module.
Please review and let me know if there is additional changes that should be made. I appreciate all the help!
Comment #9
astrocling commentedAutomated Review
PAReview(http://pareview.sh/pareview/httpgitdrupalorgsandboxmichaelhodgejr2310985git) doesn't reported any issue.
Manual Review
Code appears good to me.
I spent some time looking through your documentation and found the following issue.
Under Synopsis you note that there are actually two modules in the project. You then have LinkedIn Company bolded, and discuss that module. In the next paragraph it looks like you are discussing the second module but have it titled LinkedIn Company again, but it is not bolded. This is confusing and you should consider revision.
Other than that everything seems well thought out and put together.
Comment #10
astrocling commentedComment #11
Michael Hodge Jr commentedThanks @astrocling. I've made these changes can you please review.
Comment #12
astrocling commentedGreat it looks like the issues are fixed.
Comment #13
MattWithoos commentedastrocling, the RTBC status should be set by someone like er.pushpinderrana after he has confirmed those changes - you're not supposed to do that. Cheers.
Comment #14
jthorson commented#13 is a bit confusing ... this isn't astrocling's application, and they reviewed in #9, so there should be no problem with them marking it RTBC.
I haven't reviewed myself, but resetting the status as per #12.
Comment #15
MattWithoos commented#14 I recognise it's not astrocling's application but he had made only two posts prior to that one and I felt he wasn't in a position to accept er.pushpinderrana (#6)'s review on behalf of er.pushpinderrana. I also read the "status" requirements which, aside from being fairly loose, outline this exactly (that an experienced developer should be the one changing the status).
As you (jthorson) appear to be a regular contributor & community member, I'll leave the status as is and trust you've changed it for the right reasons.
Comment #16
jthorson commentedThanks Matt.
Given the amount of traffic which comes through this queue, and the fact that this process is driven entirely by volunteers, we like to encourage others to participate in reviewing as much as possible ... so our policy is that "anyone can review an application", and by extension, anyone can adjust the status of an application accordingly. If something is missed before an application is set to RTBC, it is the role of the git admins to catch that during a final review before promoting the project.
Thank you to both of you for helping contribute to the on-boarding of new contributors, and thank you Michael for your code contribution!
I've confirmed that each of the items in #6 have been addressed.
Comment #17
astrocling commented@Jthorson thank you for the kind words. I appreciate that the Drupal community strives to be open to participation from anyone.
Comment #18
heddnAutomated Review
Best practice issues identified by pareview.sh / drupalcs / coder. None
Manual Review
Incorrect:
Correct:
Correct:
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.
Comment #19
Michael Hodge Jr commentedRegarding
I went through that link and can confirm my thoughts as to this being a separate module. The LinkedIn company API is completely ignored in the LinkedIn module and I feel like it should be that way. There are very few use cases where someone would be using both the LinkedIn module AND this one, and even the methods for how each module goes about authenticating with LinkedIn are different. The Linkedin module authenticates with linkedin on a user account basis, whereas this module authenticates on a site-wide level.
Regarding the other issues.
1. This was an error in my git clone command. I wanted the title of the project to be "LinkedIn Company API Suite" but the shortcode to be linkedin_company. However when I changed the title, I copied the clone command without changing. I've went ahead and modified the clone command in the original post.
2. I put in a check so that if they don't want a reminder notification, then they can put in a 0 in the configuration settings and it will not display. At some point I'd like to expand this module to allow site administrators to be notified via either email or an admin message, and add appropriate configuration options to allow people to choose which they'd prefer.
3. Fixed
4. I've made this change, and thanks for that great tip. I was hoping I wouldn't have to modify the README file and hook_help, so being able to modify it in one place and have it auto-included in the other is great!
5. fixed
6. fixed
7. fixed
8. fixed in all the relevant places
9. This one i'm a little confused by. The linkedin_company_form_linkedin_admin_validate function does indeed validate the form submission. I don't see any additional validation going on in the access_token callback, but maybe I'm just missing it.
10. These should be fixed. If the minimum parameters needed to make the access call don't exist, then a return statement is triggered.
11. I moved this into the hook_requirements of the shares module as you requested.
I also ran the module through another automated review to ensure no coding standard violations were present.
Thanks for going through the module and pointing these things out. It's appreciated!
Comment #20
heddnThanks for your patience in the process.
Comment #21
heddnHmm, me thinks that the short name (#2) is something that gets configure at time of project promotion. So ignore for now.
Comment #22
Michael Hodge Jr commented1. I opened a ticket. I'll be sure to update once I know more.
2. I'll ignore this bit for now
3. Because the API key that is being used is created via the LinkedIn module, and not my module, I didn't do any validation on with it. I only validated the fields that my module added.
Comment #23
bellesmanieres commentedReference to the issue in linkedin module queue #2316721: LInkedin Company API Intentions, with my answer as one of the maintainer (summary: go for it !)
Comment #24
Michael Hodge Jr commentedThanks for the quick response @bellesmanieres! I'm setting this back to needs review.
Comment #25
Michael Hodge Jr commentedThanks for the quick response @bellesmanieres! I'm setting this back to needs review.
Comment #26
heddnMarking RTBC again. Assigning to jthorson for a final review (if he has time).
Comment #27
klausiReview of the 7.x-1.x branch (commit 10b9d49):
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:
Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.
Comment #28
Michael Hodge Jr commented@Klausi, I'll go through in the morning and work on the fixes. I'm curious as to why you removed the review bonus tag? I'm still new to the contribution scene so I'm trying to make sure I understand the process. I assume that this project is almost ready for approval and so likely at this point the bonus won't matter. Is that correct, or will I have to do another set of reviews so that the final review gets done at a quicker pace?
Comment #29
Michael Hodge Jr commented@Klausi, my responses to the items you pointed out are below. Thanks for the thorough review!
1. Fixed. I wanted to change this to sending an email anyhow, so this is what it does now.
2. Fixed
3. Fixed in linkedin_company and linkedin_company_shares
4. Fixed, there is now a separate submit function for authorization and deauthorization.
5. Fixed.
6. $error that is being passed into that function is indeed an array and is defined a few lines above it.
7. I fixed the message so it gives a better clue as to what happened
8. Removed this as requested.
9. Your right, the cache was never being hit (well it was, but it wasn't actually using the cached data). I fixed it so it should be working properly now
10. Removed the check_plains and moved them to the preprocessing function.
Comment #30
Michael Hodge Jr commentedAdded additional module reviews for secondary review bonus
Comment #31
pushpinderchauhan commentedAutomated Review
Best practice issues identified by pareview.sh / drupalcs / coder. None.
Manual Review
linkedin_company_http_request(function you are using PHP cURL to send http get request, I would recommend you to use drupal_http_request() to hit the external URL.json_decode, better to use drupal_json_decode.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.
As there is no blocker from my side, moving to RTBC.
@Michael Hodge Jr, thanks to you for your hard work and patience!
Comment #32
Michael Hodge Jr commented@er.pushpinderrana, thanks for looking over the module again for me!
1. This is on my list to change, but I'll hold off until after the module is approved. I'll create an issue in the meantime so it isn't forgotten.
2. Same as #1
3. Fixed
4. Thanks!
Comment #33
Michael Hodge Jr commentedIs there anything else I need to do at this point? I want to make sure I'm not missing something in the process.
Comment #34
MattWithoos commentedHi Michael - nothing else to do at this point except wait. There is a very large backlog of RTBC modules, yours is pretty much at the back of the queue right now (you went through the review process considerably quicker than most others after you made that LinkedIn post asking Drupal LinkedIn developers to review your module - most developers patiently wait months for the review process to complete).
As you have the review bonus I suspect the Git admins will take preference over reviewing your module.
Best of luck!
Comment #35
Michael Hodge Jr commentedThanks Matt. That's what I thought, but I wanted to be sure I wasn't missing a step.
Comment #36
Michael Hodge Jr commentedI went ahead and replaced the json_decode with drupal_json_decode and the curl request with drupal_http_request. I'm setting this back to Needs Review as these were pretty decent sized changes and could use a second pair of eyes.
Comment #37
heddnMarking as RTBC again.
Comment #38
mpdonadioAutomated Review
Review of the 7.x-1.x branch (commit dae9a28):
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
This is more a note to myself and other people reading this in the future, but linkedin_company_mail uses !site as a placeholder (ie, the passthrough version). This initially gave me heartburn, but this variable is is used this way in email subjects all through core.
In linkedin_company_cron(), the variable_get() should have a default value.
In linkedin_company_mail(), see https://api.drupal.org/api/drupal/includes%21common.inc/function/l/7 for a better way to hanled links in translated strings.
Once you know your file is README.md, you remove 64--69 in linkedin_company_help().
drupal_goto() can take the same options that you pass to l(), url(), etc. No need to fully build this up first.
In linkedin_company_access_token, you build the return URL for the call to Linked in. Don't build up this up with string functions. Use the query options like you have in other places.
In linkedin_company_shares_block_view() and linkedin_company_shares_get_data(), don't build up #markup. Build up a proper render array.
In linkedin_company_shares_get_data(), don't build up the full URL with string functions. Use the query options like you have in other places.
It would be best to fully build the attachment-title link in the preprocess, rather than the template.
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.
Not seeing any blocking issues, and issued mentioned my other admins have been addressed.
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 #39
mpdonadioThanks for your contribution, Michael Hodge Jr !
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.