Cinema6, Inc is a platform for creating engaging, embeddable video experiences for content publishers.

Embedding the Cinema6 MiniReel player normally requires the insertion of a script tag into a post. However, most Drupal setups will remove said script tag when sanitizing the post. This project translates a Wordpress-style Shortcode into our script tag when the post's HTML is being rendered.

Clone:
git clone --branch 7.x-1.x http://git.drupal.org/sandbox/minznerjosh/2328625.git

Project Page:
https://www.drupal.org/sandbox/minznerjosh/2328625

Comments

pkamerakodi’s picture

Hi,

Do we have any link where we can look into the module.

Prajwal

geekygnr’s picture

Status: Needs review » Needs work

Please review step 5 on the Apply for permission to create full projects and make sure your request has all of the required information.

The two main things you are missing is a link to the project page and a git clone command. Without these two things we can't find your module to review it.

josh@cinema6.com’s picture

Issue summary: View changes
geekygnr’s picture

The git clone command you post in your description should be one that can bee accessed by anyone (These normally have http addresses). Your git clone command is user specific.

geekygnr’s picture

Automated Review

A long list of issues were found. You should visit Pareview to view them.

Manual Review

Individual user account
Yes: Follows the guidelines for individual user accounts.
No duplication
Yes: Does not cause module duplication and fragmentation.
Master Branch
Yes: Follows the guidelines for master branch.
Licensing
Yes: Follows the licensing requirements
3rd party code
Yes: Follows the guidelines for 3rd party code.
README.txt/README.md
No: Does not follow the guidelines for in-project documentation and the README Template.
Code long/complex enough for review
Not Sure: Projects should follow the guidelines for project length and complexity. You have functions declared within functions and this is not a coding style I have seen in Drupal modules before.
Secure code
Yes: I couldn't find anything but the code is hard for me to follow.
Coding style & Drupal API usage
  1. I would re-organize the code so that you are not declaring most of your functions within a function and storing them as variables. I can't find anything saying it is against the Drupal coding standard but it defiantly strays from what I know to be the norm.
  2. Git keeps track of file permissions, you may want to touch yours up a bit. The include file is executable

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.

This review uses the Project Application Review Template.

josh@cinema6.com’s picture

Issue summary: View changes
josh@cinema6.com’s picture

I have made some modifications to the module.

1. I updated the README to use the README template
2. I looked at the Pareview report and tried to fix as many issues as I could. I'm still not sure how to fix some of them.
3. I made any functions that could be global functions global.
4. I removed some functions that were no longer needed
5. I made the include file non-executable

The code is written using functional programming patterns which is probably why it appears a bit strange.
http://www.phptherightway.com/pages/Functional-Programming.html

geekygnr’s picture

I will help you out with some of a pareview items since I don't know how many others will look at this until that is for the most part cleaned up.

Git default branch is not set, see the documentation on setting a default branch.

Go into your project and under edit there is a sub tab to select a default branch.

13 | ERROR | [ ] Paramater tags must be grouped together in a doc commment

Essentially you just need to remove line 12. So there isnt a blank line between the @param statements

19 | ERROR | [ ] There must be exactly one blank line after the file
| | comment

At the top of each php file there should a doc comment block using @file. includes/cinema6.shortcodes.inc doesn't have one of these so that is why you are getting this error.

20 | ERROR | [ ] Type hint "function[]" missing for $fns
20 | ERROR | [ ] Type hint "any" missing for $context

I am not sure what the rule on type hints are but if you add them these errors will go away.

37 | WARNING | [ ] Line exceeds 80 characters; contains 115 characters

104 | WARNING | [ ] Line exceeds 80 characters; contains 108 characters

Break apart line 37 into a couple of lines. No line in a Drupal file should be longer then 80 characters.

Your improper spacing errors I think is more an issue with the automated review tool not being able to interpret functional programming. Nothing looks wrong with the spacing to me but I can understand why the program would thing that.

As a final note, take a look at Review process for Full Project Applications: What to Expect. There is an explanation there of the work flow these requests follow. Changing your status back at the appropriate times to Needs Review will trigger other reviewers to take a look at your module and the more input the better in these matters.

josh@cinema6.com’s picture

Thank you so much for your help on this. This is my first foray into Drupal and there is a ton of stuff to keep track of. I really appreciate the time you've spent here.

josh@cinema6.com’s picture

I have made some more changes based on your feedback.

Some of the errors generated by pareview are not consistent with the documentation. For example, according to this page, parameter types are clearly marked as optional, but pareview is complaining.

On this page, the documentation states that an array of a type should be specified as type[]. When I do this, pareview complains that my PHP type hint does not correspond to what I specify in the comment. Of course it doesn't, because PHP type hints don't allow you to specify the type of items in an array.

josh@cinema6.com’s picture

Status: Needs work » Needs review
geekygnr’s picture

No problem. I just got through the process myself.

Something else that will help attract other reviewers (and perhaps the more experienced ones) is taking part in the review bonus program.

It might feel like you are behind on the curve but the first few reviews on my application were from others looking for reviews and what ever experience you have to offer will probably help make their module better.

I'll be honest reviewing this module probably helped me in getting my application approved faster.

I am being pulled towards other things so I might not be able to put in another complete review as you are probably due at this point. Hopefully some others will check out this module as well.

Best of luck.

k_zoltan’s picture

There is some error left, please have a look here:

http://pareview.sh/pareview/httpgitdrupalorgsandboxminznerjosh2328625git

Ar you still working on this project?
If not please help others works in maintaining the issue queue by closing this ticket.

mlmoseley’s picture

The module does not appear to work as designed. The sample shortcode, when placed in a node body field using the full HTML filter, does not result in a video embed. There is no other information in the readme on how to get or create shortcodes.

Individual user account

Yes

No duplication

Yes

Master Branch

Yes

Licensing

Yes

3rd party assets/code

Yes

README.txt/README.md

No. The syntax and methods for getting a mini-reel shortcode both go unexplained. The provided sample shortcode does not work. You need to tell users *how* to create shortcodes and where how to create a shortcode from a given video page on Cinema 6

Code long/complex enough for review

Yes

Secure code

Yes

Coding style & Drupal API usage

Coder found some issues:

cinema6.shortcodes.inc

    severity: normalreview: style_function_spacingLine 28: Functions should be called with no spaces between the function name and opening parentheses [style_function_spacing]

      return function($initial) use ($fns, &$context) {

    severity: normalreview: style_function_spacingLine 29: Functions should be called with no spaces between the function name and opening parentheses [style_function_spacing]

        return array_reduce($fns, function($value, $next_fn) use (&$context) {

    severity: normalreview: style_function_spacingLine 173: Functions should be called with no spaces between the function name and opening parentheses [style_function_spacing]

        function($embed_codes) use ($shortcode_to_script) {

    severity: normalreview: style_function_spacingLine 174: Functions should be called with no spaces between the function name and opening parentheses [style_function_spacing]

          return array_map(function($code) use ($shortcode_to_script) {
wwedding’s picture

Status: Needs review » Needs work

Probably should have been switched to "needs work" a while ago, based on #13 and #14. Oops!

Cinema6.com doesn't even seem to exist anymore, so I'm not sure if this still a living project submission.

Automated Testing

PAReview Only Found a minor issue.

FILE: ...r/www/drupal-7-pareview/pareview_temp/includes/cinema6.shortcodes.inc
---------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------
20 | ERROR | Missing parameter type
---------------------------------------------------------------------------

A more thorough manual review was skipped for now because cinema6.com redirects to a different company now.

PA robot’s picture

Status: Needs work » Closed (won't fix)

Closing due to lack of activity. If you are still working on this application, you should fix all known problems and then set the status to "Needs review". (See also the project application workflow).

I'm a robot and this is an automated message from Project Applications Scraper.