Stackla is a social content marketing platform used by hundreds of global brands, agencies, media companies, and nonprofits to discover, curate and publish the best content from the social web. Stackla's Drupal module allows you to display social media content and display via a Stackla widget directly on a page.

Project page: https://www.drupal.org/sandbox/helman/2679040

git clone --branch 7.x-1.x http://git.drupal.org/sandbox/helman/2679040.git stackla

CommentFileSizeAuthor
screenshot.png105.8 KBhelman
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

helman created an issue. See original summary.

PA robot’s picture

Issue summary: View changes

Fixed the git clone URL in the issue summary for non-maintainer users.

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.

pankajsachdeva’s picture

Automated Review

Found some issues. Follow link : http://pareview.sh/pareview/httpgitdrupalorgsandboxhelman2679040git

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: 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
[Found some issues:
  1. In stackla.module file:
    Line 14: Menu item titles and descriptions should NOT be enclosed within t(). (Drupal Docs)
        'title' => t('Stackla for Drupal'),
    
    Line 15: Menu item titles and descriptions should NOT be enclosed within t(). (Drupal Docs)
        'description' => t('Configure Stackla integration.'),
    
    Line 77: Use uppercase for PHP constants, e.g. NULL, TRUE, FALSE
      $credentials = new Stackla\Core\Credentials($host, null, $stack);
    
    Line 140: Use uppercase for PHP constants, e.g. NULL, TRUE, FALSE
        $credentials = new Stackla\Core\Credentials($host, null, $stack);
    
    Line 143: Use uppercase for PHP constants, e.g. NULL, TRUE, FALSE
        if ($response === false) {
    
    Line 152: Potential problem: drupal_set_message() only accepts filtered text, be sure all !placeholders for $variables in t() are fully sanitized using check_plain(), filter_xss() or similar. (Drupal Docs)
          drupal_set_message(t($_GET['error_description']), 'error');
    
    Line 173: Control statements should have one space between the control keyword and opening parenthesis
      if(!stackla_user_rights()) {
    
    Line 200: Control statements should have one space between the control keyword and opening parenthesis
      if(!(user_access('use stackla')) && !(user_access('administer stackla'))) {
    
    Line 519: missing space after comma
    function stackla_delete_element($element,$filter_id) {
    
    Line 522: missing space after comma
      $valid_elements  = array('filter','term','widget','tag');
    
    Line 523: Control statements should have one space between the control keyword and opening parenthesis
      if(!in_array($element, $valid_elements)) {
    
    Line 584: Use uppercase for PHP constants, e.g. NULL, TRUE, FALSE
    function stackla_load_tag($tag_id, $fetch = true) {
    
    Line 716: Use uppercase for PHP constants, e.g. NULL, TRUE, FALSE
      $new_widget = null;
    
    Line 914: missing space after comma
      $theme_registry['form_element']['theme path'] = drupal_get_path('module','stackla');
    
    Line 917: missing space after comma
      $theme_registry['form_element_label']['theme path'] = drupal_get_path('module','stackla');
  2. In stackla.test file:
    Line 42: missing space after comma
        $this->assertFieldById('edit-stackla-api-key','',t('The API key field appears on the config page'));
    
    Line 44: missing space after comma
        $this->drupalPost(NULL,$edit,t('Save configuration'));
    
    Line 48: missing space after comma
        $this->assertEqual($saved_key,$test_key,t('The API key is stored correctly'));
    
    Line 50: missing space after comma
        $this->assertFieldById('edit-stackla-api-key',$test_key,t('The saved key appears in the config form'));
    
    Line 69: missing space after comma
        $this->assertText('Stackla SDK library','Stackla report appears in report page');
  3. In stackla_field.install
    Line 12: Functions should be called with no spaces between the function name and opening parentheses
      $schema['columns']['widget_data'] = array (
  4. In stackla.admin.inc file:
    Line 86: else statements should begin on a new line
      } else {
    
    Line 90: Use uppercase for PHP constants, e.g. NULL, TRUE, FALSE
            '#disabled' => true,
    
    Line 117: missing space after comma
      $css = drupal_get_path('module','stackla') . '/css/stackla_powered.css';
    
    Line 123: Control statements should have one space between the control keyword and opening parenthesis
      return(system_settings_form($form));
  5. In stackla.install file:
    Line 23: Potential problem: drupal_set_message() only accepts filtered text, be sure all !placeholders for $variables in t() are fully sanitized using check_plain(), filter_xss() or similar. (Drupal Docs)
      drupal_set_message($t('Stackla module installed, you must download and extract the Stackla SDK to your libraries folder. Then !configure here. See the module README for more information.', array(
    
    Line 29: missing space after comma
      variable_set('stackla_host_name','https://api.stackla.com/api/');
    
    Line 30: missing space after comma
      variable_set('stackla_stack_oauth_host','https://api.stackla.com/api/');
  6. in stackla_field.module file:
    Line 142: missing space after comma
          $css = drupal_get_path('module','stackla_field') . '/css/stackla_field_widget.css';
    
    Line 143: missing space after comma
          $css2 = drupal_get_path('module','stackla') . '/css/stackla_powered.css';
    
    Line 144: missing space after comma
          $js = drupal_get_path('module','stackla_field') . '/js/stackla_field_widget.js';
    
    Line 178: Use uppercase for PHP constants, e.g. NULL, TRUE, FALSE
          $showDeleteOption = false;
    
    Line 183: Use uppercase for PHP constants, e.g. NULL, TRUE, FALSE
                $showDeleteOption = true;
    
    Line 249: Use uppercase for PHP constants, e.g. NULL, TRUE, FALSE
    function stackla_field_look_elements($data, $form_state, $delta, $showDeleteOption = false) {
    
    Line 671: Use uppercase for PHP constants, e.g. NULL, TRUE, FALSE
    function stackla_field_term_elements($values, $form_state, $delta, $isRequired = false) {
    
    Line 922: Use uppercase for PHP constants, e.g. NULL, TRUE, FALSE
            '#required' => count($elements) > 0 ? false : $isRequired,
    
    Line 990: Use uppercase for PHP constants, e.g. NULL, TRUE, FALSE
        $widgetIsRequired = false;
    
    Line 1005: Use uppercase for PHP constants, e.g. NULL, TRUE, FALSE
            $widgetIsRequired = true;
    
    Line 1092: Potential problem: form_set_error() and form_error() only accept filtered text, be sure to use check_plain(), filter_xss() or similar to ensure your $variable is fully sanitized.
          form_set_error($name, $error);
    
    Line 1101: Potential problem: drupal_set_message() only accepts filtered text, be sure to use check_plain(), filter_xss() or similar to ensure your $variable is fully sanitized.
          drupal_set_message($message, 'error');
    
    Line 1172: Control statements should have one space between the control keyword and opening parenthesis
        if(!empty($data['tag_id'])) {
    
    Line 1714: String concatenation should be formatted with a space separating the operators (dot .) and the surrounding terms
          $tag_slug_name = $name_prefix .'-'. preg_replace('@[^a-z0-9-]+@', '-', strtolower($data['name'])) . '-' . $entity_type . '-' . $entity_ids[0];
    
    Line 1827: curly braces { should end a line, not start one
    {
    severity: normalLine 1831: Use uppercase for PHP constants, e.g. NULL, TRUE, FALSE
        'stackla_id' => !empty($defaultFilter['stackla_id']) ? $defaultFilter['stackla_id'] : null,
    

This review uses the Project Application Review Template.

pankajsachdeva’s picture

Status: Needs review » Needs work
helman’s picture

Status: Needs work » Needs review

Hi @pankajsachdeva,

Thanks for the review and the details. The module is updated and ready for the next round review.

Thanks,
Helman

helman’s picture

Priority: Normal » Major
helman’s picture

Priority: Major » Critical
kadiiski’s picture

Automated Review

Issues can be seen at:

http://pareview.sh/pareview/httpgitdrupalorgsandboxhelman2679040git

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 / No: Does not follow] the guidelines for 3rd party assets/code.
README.txt/README.md
[Yes: Follows] 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.
Coding style & Drupal API usage

Found some issues in dile stackla.module:

  • 2 WARNINGS AFFECTING 2 LINES
  • Line 1024 - Do not call theme functions directly, use theme('form_element', ...) instead
  • Line 1033 - Do not call theme functions directly, use theme('form_element_label', ...) instead

This review uses the Project Application Review Template.

kadiiski’s picture

Status: Needs review » Needs work
klausi’s picture

Status: Needs work » Needs review

The theme() usage alone is surely not an application blocker, anything else that you found or should this be RTBC instead?

kadiiski’s picture

It's all good in my opinion. But this warnings are not that hard to fix. But yes, everything else seems good enough.
Good luck.

helman’s picture

Hi Kadiiski,

The reason that I'm not using theme() is it will cause an endless loop in there because I'm calling the theme inside the theme hooks

/**
 * Implements hook_field_form_element().
 */
function stackla_field_form_element($variables) {
  $element = $variables['element'];
  if (isset($element['#name'])) {
    switch ($element['#name']) {
      case 'stackla_oauth_callback':
        $variables['element']['#description'];
        break;
    }
  }

  // Need to call theme_field_form_element directly because it will cause an
  // endless loop when calling it with theme('field_form_element', ...).
  return theme_form_element($variables);
}

For the README.txt, do you mind point out any specific section that I miss ?

Thanks

kadiiski’s picture

My mistake - I apologize. Wrong option about the README. There's nothing with it. I checked it again.
Good luck again!

helman’s picture

Thanks kadiiski,
Need your help again to change the status if everything is good to go to next stage (RTBC).

kadiiski’s picture

Status: Needs review » Reviewed & tested by the community

Good luck budy. :)

helman’s picture

Priority: Critical » Major
helman’s picture

Priority: Major » Critical
mlncn’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for your contribution! Congratulations, you are now a vetted Git user. You can promote this to a full project.

When you create new projects (typically as a sandbox to start) you can then promote them to 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.

helman’s picture

Thanks mlncn!

Status: Fixed » Closed (fixed)

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