CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

Function init has 142 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    init : function() {
        var rem, sidebars = $('div.widgets-sortables');

        $('#widgets-right').children('.widgets-holder-wrap').children('.sidebar-name').click(function(){
            var c = $(this).siblings('.widgets-sortables'), p = $(this).parent();
Severity: Major
Found in Web.Admin/2014/wordpress/wp-admin/js/widgets.dev.js - About 5 hrs to fix

    Function init has 142 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function init() {
        var pl = "", f, val;
        var type = "flash", fe, i;
    
        ed = tinyMCEPopup.editor;

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

                  if ( true === WP_Http_ExtHttp::test($args) ) {
                      $working_transport['exthttp'] = new WP_Http_ExtHttp();
                      $blocking_transport[] = &$working_transport['exthttp'];
                  } else if ( true === WP_Http_Curl::test($args) ) {
                      $working_transport['curl'] = new WP_Http_Curl();
      Severity: Major
      Found in Web.Admin/2014/wordpress/wp-includes/http.php and 1 other location - About 5 hrs to fix
      Web.Admin/2014/wordpress/wp-includes/http.php on lines 101..113

      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 197.

      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

                  } else if ( true === WP_Http_Curl::test($args) ) {
                      $working_transport['curl'] = new WP_Http_Curl();
                      $blocking_transport[] = &$working_transport['curl'];
                  } else if ( true === WP_Http_Streams::test($args) ) {
                      $working_transport['streams'] = new WP_Http_Streams();
      Severity: Major
      Found in Web.Admin/2014/wordpress/wp-includes/http.php and 1 other location - About 5 hrs to fix
      Web.Admin/2014/wordpress/wp-includes/http.php on lines 148..160

      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 197.

      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_real_type has 141 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function get_real_type($find_handler = false)
          {
              // Mime-types by handler.
              $types_flash = array('application/x-shockwave-flash', 'application/futuresplash'); // Flash
              $types_fmedia = array('video/flv', 'video/x-flv','flv-application/octet-stream'); // Flash Media Player
      Severity: Major
      Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Enclosure.php - About 5 hrs to fix

        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/SimplePie/Item.php and 2 other locations - About 5 hrs to fix
        Web.Admin/2014/wordpress/wp-includes/SimplePie/Item.php on lines 2196..2249
        Web.Admin/2014/wordpress/wp-includes/SimplePie/Item.php on lines 2221..2245

        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 196.

        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/SimplePie/Item.php and 2 other locations - About 5 hrs to fix
        Web.Admin/2014/wordpress/wp-includes/SimplePie/Item.php on lines 2196..2249
        Web.Admin/2014/wordpress/wp-includes/SimplePie/Item.php on lines 2669..2697

        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 196.

        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 ($restrictions = $this->get_item_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'restriction'))
                    {
                        foreach ($restrictions as $restriction)
                        {
                            $restriction_relationship = null;
        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/class-simplepie.php on lines 4315..4336

        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 196.

        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

                    elseif ($restrictions = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'restriction'))
                    {
                        foreach ($restrictions as $restriction)
                        {
                            $restriction_relationship = null;
        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/class-simplepie.php on lines 4279..4350

        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 196.

        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/SimplePie/Item.php and 2 other locations - About 5 hrs to fix
        Web.Admin/2014/wordpress/wp-includes/SimplePie/Item.php on lines 2221..2245
        Web.Admin/2014/wordpress/wp-includes/SimplePie/Item.php on lines 2669..2697

        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 196.

        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

            function import_posts ( ) {
                echo '<div class="narrow">';
                echo '<p><h3>'.__('Reading UTW Post Tags&#8230;').'</h3></p>';
        
                // read in all the UTW tag -> post settings
        Severity: Major
        Found in Web.Admin/2014/wordpress/wp-admin/import/utw.php and 1 other location - About 5 hrs to fix
        Web.Admin/2014/wordpress/wp-admin/import/stp.php on lines 71..99

        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 196.

        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

            public static function atom_03_construct_type($attribs)
            {
                if (isset($attribs['']['mode']) && strtolower(trim($attribs['']['mode']) === 'base64'))
                {
                    $mode = SIMPLEPIE_CONSTRUCT_BASE64;
        Severity: Major
        Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Misc.php and 1 other location - About 5 hrs to fix
        Web.Admin/2014/wordpress/wp-includes/class-simplepie.php on lines 10951..10985

        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 196.

        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

            function atom_03_construct_type($attribs)
            {
                if (isset($attribs['']['mode']) && strtolower(trim($attribs['']['mode']) === 'base64'))
                {
                    $mode = SIMPLEPIE_CONSTRUCT_BASE64;
        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/Misc.php on lines 1835..1869

        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 196.

        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

            function import_posts ( ) {
                echo '<div class="narrow">';
                echo '<p><h3>'.__('Reading STP Post Tags&#8230;').'</h3></p>';
        
                // read in all the STP tag -> post settings
        Severity: Major
        Found in Web.Admin/2014/wordpress/wp-admin/import/stp.php and 1 other location - About 5 hrs to fix
        Web.Admin/2014/wordpress/wp-admin/import/utw.php on lines 129..163

        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 196.

        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

        Function init has 140 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            init: function( target, options ) {
        
                options = _legacyOptions( options );
        
                // save the original ingredients
        Severity: Major
        Found in Web.Admin/2015/js/galleria/galleria-1.4.2.js - About 5 hrs to fix

          Function init has 140 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              init: function( target, options ) {
          
                  options = _legacyOptions( options );
          
                  // save the original ingredients
          Severity: Major
          Found in Web.Admin/Content/galleria/galleria-1.4.2.js - About 5 hrs to fix

            Method process_posts has 140 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function process_posts() {
                    global $wpdb;
            
                    $handle = $this->fopen($this->file, 'r');
                    if ( $handle == null )
            Severity: Major
            Found in Web.Admin/2014/wordpress/wp-admin/import/mt.php - About 5 hrs to fix

              Function create has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring.
              Open

                function create($p_filelist)
                {
                  $v_result=1;
              
                  // ----- Reset the error handler
              Severity: Minor
              Found in Web.Admin/2014/wordpress/wp-admin/includes/class-pclzip.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

              Function get_admin_page_parent has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring.
              Open

              function get_admin_page_parent( $parent = '' ) {
                  global $parent_file;
                  global $menu;
                  global $submenu;
                  global $pagenow;
              Severity: Minor
              Found in Web.Admin/2014/wordpress/wp-admin/includes/plugin.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

              Function page_rows has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring.
              Open

              function page_rows($pages, $pagenum = 1, $per_page = 20) {
                  global $wpdb;
              
                  $level = 0;
              
              
              Severity: Minor
              Found in Web.Admin/2014/wordpress/wp-admin/includes/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

              Severity
              Category
              Status
              Source
              Language