CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

Function _walk_bookmarks has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring.
Open

function _walk_bookmarks($bookmarks, $args = '' ) {
    $defaults = array(
        'show_updated' => 0, 'show_description' => 0,
        'show_images' => 1, 'show_name' => 0,
        'before' => '<li>', 'after' => '</li>', 'between' => "\n",
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/bookmark-template.php - About 5 hrs to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

File service.data.js has 391 lines of code (exceeds 250 allowed). Consider refactoring.
Open

(function () {
    "use strict";

    var dataService = function ($http, ngUpload, moment) {
        return {
Severity: Minor
Found in Web.Admin/AdminApp/Services/service.data.js - About 5 hrs to fix

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

            if (substr($data, 0, 4) === "\x00\x00\xFE\xFF")
            {
                $data = substr($data, 4);
            }
            // UTF-32 Little Endian BOM
    Severity: Major
    Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Parser.php and 1 other location - About 5 hrs to fix
    Web.Admin/2014/wordpress/wp-includes/class-simplepie.php on lines 14340..14363

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 191.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

                            if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['rating']))
                            {
                                foreach ($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['rating'] as $rating)
                                {
                                    $rating_scheme = null;
    Severity: Major
    Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php and 2 other locations - About 5 hrs to fix
    Web.Admin/2014/wordpress/wp-includes/class-simplepie.php on lines 4889..4942
    Web.Admin/2014/wordpress/wp-includes/class-simplepie.php on lines 4914..4938

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 191.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

                            if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['rating']))
                            {
                                foreach ($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['rating'] as $rating)
                                {
                                    $rating_scheme = null;
    Severity: Major
    Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php and 2 other locations - About 5 hrs to fix
    Web.Admin/2014/wordpress/wp-includes/class-simplepie.php on lines 4914..4938
    Web.Admin/2014/wordpress/wp-includes/class-simplepie.php on lines 5359..5387

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 191.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

                            elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['rating']))
                            {
                                foreach ($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['rating'] as $rating)
                                {
                                    $rating_scheme = null;
    Severity: Major
    Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php and 2 other locations - About 5 hrs to fix
    Web.Admin/2014/wordpress/wp-includes/class-simplepie.php on lines 4889..4942
    Web.Admin/2014/wordpress/wp-includes/class-simplepie.php on lines 5359..5387

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 191.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    class SimplePie_Category
    {
        var $term;
        var $scheme;
        var $label;
    Severity: Major
    Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php and 1 other location - About 5 hrs to fix
    Web.Admin/2014/wordpress/wp-includes/SimplePie/Category.php on lines 55..156

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 191.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    class SimplePie_Category
    {
        /**
         * Category identifier
         *
    Severity: Major
    Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Category.php and 1 other location - About 5 hrs to fix
    Web.Admin/2014/wordpress/wp-includes/class-simplepie.php on lines 6333..6388

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 191.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

            if (substr($data, 0, 4) === "\x00\x00\xFE\xFF")
            {
                $data = substr($data, 4);
            }
            // UTF-32 Little Endian BOM
    Severity: Major
    Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php and 1 other location - About 5 hrs to fix
    Web.Admin/2014/wordpress/wp-includes/SimplePie/Parser.php on lines 92..115

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 191.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Method display_page_row has 134 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function display_page_row( $page, $level = 0 ) {
        global $post;
        static $rowclass;
    
        $post = $page;
    Severity: Major
    Found in Web.Admin/2014/wordpress/wp-admin/includes/template.php - About 5 hrs to fix

      File plugin-install.php has 390 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      <?php
      /**
       * WordPress Plugin Install Administration API
       *
       * @package WordPress
      Severity: Minor
      Found in Web.Admin/2014/wordpress/wp-admin/includes/plugin-install.php - About 5 hrs to fix

        Method getOnlyMPEGaudioInfoBruteForce has 134 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function getOnlyMPEGaudioInfoBruteForce() {
                $MPEGaudioHeaderDecodeCache   = array();
                $MPEGaudioHeaderValidCache    = array();
                $MPEGaudioHeaderLengthCache   = array();
                $MPEGaudioVersionLookup       = self::MPEGaudioVersionArray();
        Severity: Major
        Found in Web.Admin/2014/wordpress/wp-includes/ID3/module.audio.mp3.php - About 5 hrs to fix

          Method request_filesystem_credentials has 133 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function request_filesystem_credentials($form_post, $type = '', $error = false, $context = false) {
              $req_cred = apply_filters('request_filesystem_credentials', '', $form_post, $type, $error, $context);
              if ( '' !== $req_cred )
                  return $req_cred;
          
          
          Severity: Major
          Found in Web.Admin/2014/wordpress/wp-admin/includes/file.php - About 5 hrs to fix

            Method upgrade_230 has 133 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function upgrade_230() {
                global $wp_current_db_version, $wpdb;
            
                if ( $wp_current_db_version < 5200 ) {
                    populate_roles_230();
            Severity: Major
            Found in Web.Admin/2014/wordpress/wp-admin/includes/upgrade.php - About 5 hrs to fix

              Similar blocks of code found in 3 locations. Consider refactoring.
              Open

                      videoPlaylistMenu: function( view ) {
                          var lastState = this.lastState(),
                              previous = lastState && lastState.id,
                              frame = this;
              
              
              Severity: Major
              Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js and 2 other locations - About 5 hrs to fix
              Web.Admin/2014/wordpress/wp-includes/js/media-views.js on lines 2319..2341
              Web.Admin/2014/wordpress/wp-includes/js/media-views.js on lines 2822..2845

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 141.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Similar blocks of code found in 3 locations. Consider refactoring.
              Open

                      renderMenu: function( view ) {
                          var lastState = this.lastState(),
                              previous = lastState && lastState.id,
                              frame = this;
              
              
              Severity: Major
              Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js and 2 other locations - About 5 hrs to fix
              Web.Admin/2014/wordpress/wp-includes/js/media-views.js on lines 2319..2341
              Web.Admin/2014/wordpress/wp-includes/js/media-views.js on lines 2343..2365

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 141.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Similar blocks of code found in 3 locations. Consider refactoring.
              Open

                      playlistMenu: function( view ) {
                          var lastState = this.lastState(),
                              previous = lastState && lastState.id,
                              frame = this;
              
              
              Severity: Major
              Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js and 2 other locations - About 5 hrs to fix
              Web.Admin/2014/wordpress/wp-includes/js/media-views.js on lines 2343..2365
              Web.Admin/2014/wordpress/wp-includes/js/media-views.js on lines 2822..2845

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 141.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Similar blocks of code found in 2 locations. Consider refactoring.
              Open

                              if ( $i <= $numpages && $more ) {
                                  if ( 1 == $i ) {
                                      $output .= '<a href="' . get_permalink() . '">' . $link_before. $nextpagelink . $link_after . '</a>';
                                  } else {
                                      if ( '' == get_option('permalink_structure') || in_array($post->post_status, array('draft', 'pending')) )
              Severity: Major
              Found in Web.Admin/2014/wordpress/wp-includes/post-template.php and 1 other location - About 5 hrs to fix
              Web.Admin/2014/wordpress/wp-includes/post-template.php on lines 601..610

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 189.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Similar blocks of code found in 2 locations. Consider refactoring.
              Open

                              if ( $i && $more ) {
                                  if ( 1 == $i ) {
                                      $output .= '<a href="' . get_permalink() . '">' . $link_before. $previouspagelink . $link_after . '</a>';
                                  } else {
                                      if ( '' == get_option('permalink_structure') || in_array($post->post_status, array('draft', 'pending')) )
              Severity: Major
              Found in Web.Admin/2014/wordpress/wp-includes/post-template.php and 1 other location - About 5 hrs to fix
              Web.Admin/2014/wordpress/wp-includes/post-template.php on lines 612..621

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 189.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Method get_themes has 132 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function get_themes() {
                  global $wp_themes, $wp_broken_themes;
              
                  if ( isset($wp_themes) )
                      return $wp_themes;
              Severity: Major
              Found in Web.Admin/2014/wordpress/wp-includes/theme.php - About 5 hrs to fix
                Severity
                Category
                Status
                Source
                Language