CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

Function _show has 182 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    _show : function() {

        // shortcuts
        var self = this,
            queue = this._queue[ 0 ],
Severity: Major
Found in Web.Admin/Content/galleria/galleria-1.4.2.js - About 7 hrs to fix

    Method import has 182 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function import() {
            global $wpdb;
    
            $wpvarstoreset = array('gmpath', 'archivespath', 'lastentry');
            for ($i=0; $i<count($wpvarstoreset); $i += 1) {
    Severity: Major
    Found in Web.Admin/2014/wordpress/wp-admin/import/greymatter.php - About 7 hrs to fix

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

              if ($xml_is_sane)
              {
                  $xml = xml_parser_create_ns($this->encoding, $this->separator);
                  xml_parser_set_option($xml, XML_OPTION_SKIP_WHITE, 1);
                  xml_parser_set_option($xml, XML_OPTION_CASE_FOLDING, 0);
      Severity: Major
      Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php and 1 other location - About 7 hrs to fix
      Web.Admin/2014/wordpress/wp-includes/SimplePie/Parser.php on lines 144..235

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

      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 ($xml_is_sane)
              {
                  $xml = xml_parser_create_ns($this->encoding, $this->separator);
                  xml_parser_set_option($xml, XML_OPTION_SKIP_WHITE, 1);
                  xml_parser_set_option($xml, XML_OPTION_CASE_FOLDING, 0);
      Severity: Major
      Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Parser.php and 1 other location - About 7 hrs to fix
      Web.Admin/2014/wordpress/wp-includes/class-simplepie.php on lines 14392..14483

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

      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 insert_with_markers has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring.
      Open

      function insert_with_markers( $filename, $marker, $insertion ) {
          if (!file_exists( $filename ) || is_writeable( $filename ) ) {
              if (!file_exists( $filename ) ) {
                  $markerdata = '';
              } else {
      Severity: Minor
      Found in Web.Admin/2014/wordpress/wp-admin/includes/misc.php - About 7 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 WrapText has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring.
      Open

        function WrapText($message, $length, $qp_mode = false) {
          $soft_break = ($qp_mode) ? sprintf(" =%s", $this->LE) : $this->LE;
          // If utf-8 encoding is used, we will need to make sure we don't
          // split multibyte characters when we wrap
          $is_utf8 = (strtolower($this->CharSet) == "utf-8");
      Severity: Minor
      Found in Web.Admin/2014/wordpress/wp-includes/class-phpmailer.php - About 7 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

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

                  if (real_ratio < aspect)
                  {
                      yy = y2;
                      w = rha * aspect;
                      xx = rw < 0 ? x1 - w : w + x1;
      Web.Admin/2014/wordpress/wp-includes/js/jcrop/jquery.Jcrop.js on lines 24..33

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

      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(real_ratio<aspect)
      {yy=y2;w=rha*aspect;xx=rw<0?x1-w:w+x1;if(xx<0)
      {xx=0;h=Math.abs((xx-x1)/aspect);yy=rh<0?y1-h:h+y1;}
      else if(xx>boundx)
      {xx=boundx;h=Math.abs((xx-x1)/aspect);yy=rh<0?y1-h:h+y1;}}
      Web.Admin/2014/wordpress/wp-includes/js/jcrop/jquery.Jcrop.dev.js on lines 250..286

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

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

        function privExtractFile(&$p_entry, $p_path, $p_remove_path, $p_remove_all_path, &$p_options)
        {
          $v_result=1;
      
          // ----- Read the file header
      Severity: Major
      Found in Web.Admin/2014/wordpress/wp-admin/includes/class-pclzip.php - About 7 hrs to fix

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

        Ajax.Base = Class.create({
          initialize: function(options) {
            this.options = {
              method:       'post',
              asynchronous: true,
        Web.Admin/2014/wordpress/wp-includes/js/prototype.js on lines 1176..1193

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

        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

        Ajax.Base = Class.create({
          initialize: function(options) {
            this.options = {
              method:       'post',
              asynchronous: true,
        Severity: Major
        Found in Web.Admin/2014/wordpress/wp-includes/js/prototype.js and 1 other location - About 7 hrs to fix
        Web.Admin/2014/wordpress/wp-includes/js/scriptaculous/prototype.js on lines 1176..1193

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

        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 ( isset($_GET['delete_all']) || isset($_GET['delete_all2']) ) {
                $post_status = preg_replace('/[^a-z0-9_-]+/i', '', $_GET['post_status']);
                $post_ids = $wpdb->get_col( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_type='page' AND post_status = %s", $post_status ) );
                $doaction = 'delete';
            } elseif ( ( $_GET['action'] != -1 || $_GET['action2'] != -1 ) && ( isset($_GET['post']) || isset($_GET['ids']) ) ) {
        Severity: Major
        Found in Web.Admin/2014/wordpress/wp-admin/edit-pages.php and 1 other location - About 7 hrs to fix
        Web.Admin/2014/wordpress/wp-admin/edit.php on lines 31..40

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

        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 ( isset($_GET['delete_all']) || isset($_GET['delete_all2']) ) {
                $post_status = preg_replace('/[^a-z0-9_-]+/i', '', $_GET['post_status']);
                $post_ids = $wpdb->get_col( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_type='post' AND post_status = %s", $post_status ) );
                $doaction = 'delete';
            } elseif ( ( $_GET['action'] != -1 || $_GET['action2'] != -1 ) && ( isset($_GET['post']) || isset($_GET['ids']) ) ) {
        Severity: Major
        Found in Web.Admin/2014/wordpress/wp-admin/edit.php and 1 other location - About 7 hrs to fix
        Web.Admin/2014/wordpress/wp-admin/edit-pages.php on lines 23..32

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

        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

        AtomServer has 51 functions (exceeds 20 allowed). Consider refactoring.
        Open

        class AtomServer {
        
            /**
             * ATOM content type.
             *
        Severity: Major
        Found in Web.Admin/2014/wordpress/wp-app.php - About 7 hrs to fix

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

              each : function(obj, cb, scope) {
                  var n, l;
          
                  if ( !obj )
                      return 0;
          Severity: Major
          Found in Web.Admin/2014/wordpress/wp-includes/js/utils.js and 1 other location - About 7 hrs to fix
          Web.Admin/2014/wordpress/wp-admin/js/utils.dev.js on lines 28..51

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

          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

              each : function(o, cb, s) {
                  var n, l;
          
                  if (!o)
                      return 0;
          Severity: Major
          Found in Web.Admin/2014/wordpress/wp-admin/js/utils.dev.js and 1 other location - About 7 hrs to fix
          Web.Admin/2014/wordpress/wp-includes/js/utils.js on lines 8..31

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

          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

          File script-loader.php has 464 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          <?php
          /**
           * WordPress scripts and styles default loader.
           *
           * Most of the functionality that existed here was moved to
          Severity: Minor
          Found in Web.Admin/2014/wordpress/wp-includes/script-loader.php - About 7 hrs to fix

            File slider.js has 463 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            /*
             * Twenty Fourteen Featured Content Slider
             *
             * Adapted from FlexSlider v2.2.0, copyright 2012 WooThemes
             * @link http://www.woothemes.com/flexslider/

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

              var ObjectRange = Class.create(Enumerable, {
                initialize: function(start, end, exclusive) {
                  this.start = start;
                  this.end = end;
                  this.exclusive = exclusive;
              Severity: Major
              Found in Web.Admin/2014/wordpress/wp-includes/js/prototype.js and 1 other location - About 7 hrs to fix
              Web.Admin/2014/wordpress/wp-includes/js/scriptaculous/prototype.js on lines 1102..1124

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

              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

              var ObjectRange = Class.create(Enumerable, {
                initialize: function(start, end, exclusive) {
                  this.start = start;
                  this.end = end;
                  this.exclusive = exclusive;
              Web.Admin/2014/wordpress/wp-includes/js/prototype.js on lines 1102..1124

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

              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

              Severity
              Category
              Status
              Source
              Language