CaffGeek/MBACNationals

View on GitHub

Showing 5,566 of 7,504 total issues

Method get_bloginfo has 82 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function get_bloginfo($show = '', $filter = 'raw') {

    switch($show) {
        case 'url' :
        case 'home' : // DEPRECATED
Severity: Major
Found in Web.Admin/2014/wordpress/wp-includes/general-template.php - About 3 hrs to fix

    Method wp_setup_nav_menu_item has 82 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function wp_setup_nav_menu_item( $menu_item ) {
        if ( isset( $menu_item->post_type ) ) {
            if ( 'nav_menu_item' == $menu_item->post_type ) {
                $menu_item->db_id = (int) $menu_item->ID;
                $menu_item->menu_item_parent = empty( $menu_item->menu_item_parent ) ? get_post_meta( $menu_item->ID, '_menu_item_menu_item_parent', true ) : $menu_item->menu_item_parent;
    Severity: Major
    Found in Web.Admin/2014/wordpress/wp-includes/nav-menu.php - About 3 hrs to fix

      Method request has 82 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function request($url, $args = array()) {
              $defaults = array(
                  'method' => 'GET', 'timeout' => 5,
                  'redirection' => 5, 'httpversion' => '1.0',
                  'blocking' => true,
      Severity: Major
      Found in Web.Admin/2014/wordpress/wp-includes/http.php - About 3 hrs to fix

        File charmap.js has 303 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        tinyMCEPopup.requireLangPack();
        
        var charmap = [
            [' ',    ' ',  true, 'no-break space'],
            ['&',     '&',   true, 'ampersand'],

          Function PopupWindow_isClicked has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
          Open

          function PopupWindow_isClicked(e) {
              if (this.divName != null) {
                  if (this.use_layers) {
                      var clickX = e.pageX;
                      var clickY = e.pageY;
          Severity: Minor
          Found in Web.Admin/2014/wordpress/wp-includes/js/colorpicker.dev.js - About 3 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 initialize has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
          Open

            initialize: function(testcases) {
              this.options = Object.extend({
                testLog: 'testlog'
              }, arguments[1] || {});
              this.options.resultsURL = this.parseResultsURLQueryParameter();
          Severity: Minor
          Found in Web.Admin/2014/wordpress/wp-includes/js/scriptaculous/unittest.js - About 3 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 calculateMovingAverage has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
          Open

              SWFUpload.speed.calculateMovingAverage = function (history) {
                  var vals = [], size, sum = 0.0, mean = 0.0, varianceTemp = 0.0, variance = 0.0, standardDev = 0.0;
                  var i;
                  var mSum = 0, mCount = 0;
                  

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

            function privExtractFileAsString(&$p_entry, &$p_string, &$p_options)
            {
              $v_result=1;
          
              // ----- Read the file header
          Severity: Minor
          Found in Web.Admin/2014/wordpress/wp-admin/includes/class-pclzip.php - About 3 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_cli_args has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
          Open

          function get_cli_args( $param, $required = false ) {
              $args = $_SERVER['argv'];
          
              $out = array();
          
          
          Severity: Minor
          Found in Web.Admin/2014/wordpress/wp-admin/includes/class-wp-importer.php - About 3 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 mput has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
          Open

              function mput($local=".", $remote=NULL, $continious=false) {
                  $local=realpath($local);
                  if(!@file_exists($local)) {
                      $this->PushError("mput","can't open local folder", "Cannot stat folder \"".$local."\"");
                      return FALSE;
          Severity: Minor
          Found in Web.Admin/2014/wordpress/wp-admin/includes/class-ftp.php - About 3 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 display_rows has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
          Open

              function display_rows() {
                  $plugins_allowedtags = array(
                      'a' => array( 'href' => array(),'title' => array(), 'target' => array() ),
                      'abbr' => array( 'title' => array() ),'acronym' => array( 'title' => array() ),
                      'code' => array(), 'pre' => array(), 'em' => array(),'strong' => array(),

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

          function upgrade_210() {
              global $wpdb, $wp_current_db_version;
          
              if ( $wp_current_db_version < 3506 ) {
                  // Update status and type.
          Severity: Minor
          Found in Web.Admin/2014/wordpress/wp-admin/includes/upgrade.php - About 3 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 mw_getRecentPosts has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
          Open

              function mw_getRecentPosts($args) {
          
                  $this->escape($args);
          
                  $blog_ID     = (int) $args[0];
          Severity: Minor
          Found in Web.Admin/2014/wordpress/wp-includes/class-wp-xmlrpc-server.php - About 3 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 BigEndian2Float has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
          Open

              public static function BigEndian2Float($byteword) {
                  // ANSI/IEEE Standard 754-1985, Standard for Binary Floating Point Arithmetic
                  // http://www.psc.edu/general/software/packages/ieee/ieee.html
                  // http://www.scri.fsu.edu/~jac/MAD3401/Backgrnd/ieee.html
          
          
          Severity: Minor
          Found in Web.Admin/2014/wordpress/wp-includes/ID3/getid3.lib.php - About 3 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

          Method __construct has 26 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              public function __construct($link = null, $type = null, $length = null, $javascript = null, $bitrate = null, $captions = null, $categories = null, $channels = null, $copyright = null, $credits = null, $description = null, $duration = null, $expression = null, $framerate = null, $hashes = null, $height = null, $keywords = null, $lang = null, $medium = null, $player = null, $ratings = null, $restrictions = null, $samplingrate = null, $thumbnails = null, $title = null, $width = null)
          Severity: Major
          Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Enclosure.php - About 3 hrs to fix

            Function image_get_intermediate_size has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
            Open

            function image_get_intermediate_size($post_id, $size='thumbnail') {
                if ( !is_array( $imagedata = wp_get_attachment_metadata( $post_id ) ) )
                    return false;
            
                // get the best one for a specified set of dimensions
            Severity: Minor
            Found in Web.Admin/2014/wordpress/wp-includes/media.php - About 3 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_update_themes has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
            Open

            function wp_update_themes( ) {
                global $wp_version;
            
                if( defined( 'WP_INSTALLING' ) )
                    return false;
            Severity: Minor
            Found in Web.Admin/2014/wordpress/wp-includes/update.php - About 3 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_print_media_templates has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
            Open

            function wp_print_media_templates() {
                global $is_IE;
                $class = 'media-modal wp-core-ui';
                if ( $is_IE && strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 7') !== false )
                    $class .= ' ie7';
            Severity: Minor
            Found in Web.Admin/2014/wordpress/wp-includes/media-template.php - About 3 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

            Method SimplePie_Enclosure has 26 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                function SimplePie_Enclosure($link = null, $type = null, $length = null, $javascript = null, $bitrate = null, $captions = null, $categories = null, $channels = null, $copyright = null, $credits = null, $description = null, $duration = null, $expression = null, $framerate = null, $hashes = null, $height = null, $keywords = null, $lang = null, $medium = null, $player = null, $ratings = null, $restrictions = null, $samplingrate = null, $thumbnails = null, $title = null, $width = null)
            Severity: Major
            Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 3 hrs to fix

              Function wp_explain_nonce has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
              Open

              function wp_explain_nonce( $action ) {
                  if ( $action !== -1 && preg_match( '/([a-z]+)-([a-z]+)(_(.+))?/', $action, $matches ) ) {
                      $verb = $matches[1];
                      $noun = $matches[2];
              
              
              Severity: Minor
              Found in Web.Admin/2014/wordpress/wp-includes/functions.php - About 3 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