CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

Method akismet_conf has 138 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function akismet_conf() {
    global $akismet_nonce, $wpcom_api_key;

    if ( isset($_POST['submit']) ) {
        if ( function_exists('current_user_can') && !current_user_can('manage_options') )
Severity: Major
Found in Web.Admin/2014/wordpress/wp-content/plugins/akismet/akismet.php - About 5 hrs to fix

    File edit-comments.dev.js has 396 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    var theList, theExtraList, toggleWithKeyboard = false;
    (function($) {
    
    setCommentsList = function() {
        var totalInput, perPageInput, pageInput, lastConfidentTime = 0, dimAfter, delBefore, updateTotalCount, delAfter;
    Severity: Minor
    Found in Web.Admin/2014/wordpress/wp-admin/js/edit-comments.dev.js - About 5 hrs to fix

      WP_Import has 41 functions (exceeds 20 allowed). Consider refactoring.
      Open

      class WP_Import {
      
          var $post_ids_processed = array ();
          var $orphans = array ();
          var $file;
      Severity: Minor
      Found in Web.Admin/2014/wordpress/wp-admin/import/wordpress.php - About 5 hrs to fix

        SimplePie_Enclosure has 41 functions (exceeds 20 allowed). Consider refactoring.
        Open

        class SimplePie_Enclosure
        {
            /**
             * @var string
             * @see get_bitrate()
        Severity: Minor
        Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Enclosure.php - About 5 hrs to fix

          SimplePie_Enclosure has 41 functions (exceeds 20 allowed). Consider refactoring.
          Open

          class SimplePie_Enclosure
          {
              var $bitrate;
              var $captions;
              var $categories;
          Severity: Minor
          Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 5 hrs to fix

            Function _enter has 136 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    _enter: function( callback ) {
            
                        fullscreen.active = true;
            
                        if ( IFRAME ) {
            Severity: Major
            Found in Web.Admin/2015/js/galleria/galleria-1.4.2.js - About 5 hrs to fix

              Function _enter has 136 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      _enter: function( callback ) {
              
                          fullscreen.active = true;
              
                          if ( IFRAME ) {
              Severity: Major
              Found in Web.Admin/Content/galleria/galleria-1.4.2.js - About 5 hrs to fix

                Method Analyze has 136 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function Analyze() {
                        $info = &$this->getid3->info;
                
                        ///AH
                        $info['ac3']['raw']['bsi'] = array();
                Severity: Major
                Found in Web.Admin/2014/wordpress/wp-includes/ID3/module.audio.ac3.php - About 5 hrs to fix

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

                  <?php
                  /**
                   * SimplePie
                   *
                   * A PHP-Based RSS and Atom Feed Framework.
                  Severity: Major
                  Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Author.php and 2 other locations - About 5 hrs to fix
                  Web.Admin/2014/wordpress/wp-includes/SimplePie/Credit.php on lines 1..156
                  Web.Admin/2014/wordpress/wp-includes/SimplePie/Restriction.php on lines 1..155

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

                  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

                  <?php
                  /**
                   * SimplePie
                   *
                   * A PHP-Based RSS and Atom Feed Framework.
                  Severity: Major
                  Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Credit.php and 2 other locations - About 5 hrs to fix
                  Web.Admin/2014/wordpress/wp-includes/SimplePie/Author.php on lines 1..157
                  Web.Admin/2014/wordpress/wp-includes/SimplePie/Restriction.php on lines 1..155

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

                  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

                  <?php
                  /**
                   * SimplePie
                   *
                   * A PHP-Based RSS and Atom Feed Framework.
                  Web.Admin/2014/wordpress/wp-includes/SimplePie/Author.php on lines 1..157
                  Web.Admin/2014/wordpress/wp-includes/SimplePie/Credit.php on lines 1..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 192.

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

                      SWFUpload.speed.formatUnits = function (baseNumber, unitDivisors, unitLabels, singleFractional) {
                          var i, unit, unitDivisor, unitLabel;
                  
                          if (baseNumber === 0) {
                              return "0 " + unitLabels[unitLabels.length - 1];

                  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_real_type has a Cognitive Complexity of 36 (exceeds 5 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: Minor
                  Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Enclosure.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_links has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public function get_links($rel = 'alternate')
                      {
                          if (!isset($this->data['links']))
                          {
                              $this->data['links'] = array();
                  Severity: Minor
                  Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Item.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 xml_encoding has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public static function xml_encoding($data, $registry)
                      {
                          // UTF-32 Big Endian BOM
                          if (substr($data, 0, 4) === "\x00\x00\xFE\xFF")
                          {
                  Severity: Minor
                  Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Misc.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 wp_widget_rss_output has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function wp_widget_rss_output( $rss, $args = array() ) {
                      if ( is_string( $rss ) ) {
                          $rss = fetch_feed($rss);
                      } elseif ( is_array($rss) && isset($rss['url']) ) {
                          $args = $rss;
                  Severity: Minor
                  Found in Web.Admin/2014/wordpress/wp-includes/default-widgets.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 _diag has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring.
                  Open

                      function _diag ($xoff, $xlim, $yoff, $ylim, $nchunks)
                      {
                          $flip = false;
                  
                          if ($xlim - $xoff > $ylim - $yoff) {
                  Severity: Minor
                  Found in Web.Admin/2014/wordpress/wp-includes/Text/Diff/Engine/native.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_links has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring.
                  Open

                      function get_links($rel = 'alternate')
                      {
                          if (!isset($this->data['links']))
                          {
                              $this->data['links'] = array();
                  Severity: Minor
                  Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.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 xml_encoding has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring.
                  Open

                      function xml_encoding($data)
                      {
                          // UTF-32 Big Endian BOM
                          if (substr($data, 0, 4) === "\x00\x00\xFE\xFF")
                          {
                  Severity: Minor
                  Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.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_links has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function get_links($category = -1, $before = '', $after = '<br />', $between = ' ', $show_images = true, $orderby = 'name',
                              $show_description = true, $show_rating = false, $limit = -1, $show_updated = 1, $echo = true) {
                      _deprecated_function(__FUNCTION__, '0.0', 'get_bookmarks()');
                  
                      $order = 'ASC';
                  Severity: Minor
                  Found in Web.Admin/2014/wordpress/wp-includes/deprecated.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