CaffGeek/MBACNationals

View on GitHub

Showing 5,566 of 7,504 total issues

Method start_el has 36 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function start_el(&$output, $comment, $depth, $args) {
        $depth++;
        $GLOBALS['comment_depth'] = $depth;

        if ( !empty($args['callback']) ) {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/comment-template.php - About 1 hr to fix

    Method wpautop has 36 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function wpautop($pee, $br = 1) {
    
        if ( trim($pee) === '' )
            return '';
        $pee = $pee . "\n"; // just to make things a little easier, pad the end
    Severity: Minor
    Found in Web.Admin/2014/wordpress/wp-includes/formatting.php - About 1 hr to fix

      Function concat has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
      Open

        Array.prototype.concat = function() {
          var array = [];
          for (var i = 0, length = this.length; i < length; i++) array.push(this[i]);
          for (var i = 0, length = arguments.length; i < length; i++) {
            if (Object.isArray(arguments[i])) {
      Severity: Minor
      Found in Web.Admin/2014/wordpress/wp-includes/js/prototype.js - About 1 hr 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 descendantOf has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
      Open

        descendantOf: function(element, ancestor) {
          element = $(element), ancestor = $(ancestor);
      
          if (element.compareDocumentPosition)
            return (element.compareDocumentPosition(ancestor) & 8) === 8;
      Severity: Minor
      Found in Web.Admin/2014/wordpress/wp-includes/js/prototype.js - About 1 hr 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 concat has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
      Open

        Array.prototype.concat = function() {
          var array = [];
          for (var i = 0, length = this.length; i < length; i++) array.push(this[i]);
          for (var i = 0, length = arguments.length; i < length; i++) {
            if (Object.isArray(arguments[i])) {
      Severity: Minor
      Found in Web.Admin/2014/wordpress/wp-includes/js/scriptaculous/prototype.js - About 1 hr 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 start has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
      Open

        start: function(options) {
          function codeForEvent(options,eventName){
            return (
              (options[eventName+'Internal'] ? 'this.options.'+eventName+'Internal(this);' : '') +
              (options[eventName] ? 'this.options.'+eventName+'(this);' : '')
      Severity: Minor
      Found in Web.Admin/2014/wordpress/wp-includes/js/scriptaculous/effects.js - About 1 hr 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 descendantOf has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
      Open

        descendantOf: function(element, ancestor) {
          element = $(element), ancestor = $(ancestor);
      
          if (element.compareDocumentPosition)
            return (element.compareDocumentPosition(ancestor) & 8) === 8;
      Severity: Minor
      Found in Web.Admin/2014/wordpress/wp-includes/js/scriptaculous/prototype.js - About 1 hr 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 refreshCookies has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
      Open

          SWFUpload.prototype.refreshCookies = function (sendToFlash) {
              if (sendToFlash === undefined) {
                  sendToFlash = true;
              }
              sendToFlash = !!sendToFlash;

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

        function privMerge(&$p_archive_to_add)
        {
          $v_result=1;
      
          // ----- Look if the archive_to_add exists
      Severity: Minor
      Found in Web.Admin/2014/wordpress/wp-admin/includes/class-pclzip.php - About 1 hr 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 delete_theme has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
      Open

      function delete_theme($template) {
          global $wp_filesystem;
      
          if ( empty($template) )
              return false;
      Severity: Minor
      Found in Web.Admin/2014/wordpress/wp-admin/includes/theme.php - About 1 hr 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_alloptions_110 has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
      Open

      function get_alloptions_110() {
          global $wpdb;
          if ($options = $wpdb->get_results("SELECT option_name, option_value FROM $wpdb->options")) {
              foreach ($options as $option) {
                  // "When trying to design a foolproof system,
      Severity: Minor
      Found in Web.Admin/2014/wordpress/wp-admin/includes/upgrade.php - About 1 hr 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 glob_pattern_match has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
      Open

          function glob_pattern_match($pattern,$string) {
              $out=null;
              $chunks=explode(';',$pattern);
              foreach($chunks as $pattern) {
                  $escape=array('$','^','.','{','}','(',')','[',']','|');
      Severity: Minor
      Found in Web.Admin/2014/wordpress/wp-admin/includes/class-ftp.php - About 1 hr 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 chmod has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
      Open

          function chmod($file, $mode = false, $recursive = false) {
              if ( ! $this->exists($file) && ! $this->is_dir($file) )
                  return false;
      
              if ( ! $mode ) {

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

      function wp_delete_user($id, $reassign = 'novalue') {
          global $wpdb;
      
          $id = (int) $id;
          $user = new WP_User($id);
      Severity: Minor
      Found in Web.Admin/2014/wordpress/wp-admin/includes/user.php - About 1 hr 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 set_blog has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
      Open

          function set_blog( $blog_id ) {
              if ( is_numeric( $blog_id ) ) {
                  $blog_id = (int) $blog_id;
              } else {
                  $blog = 'http://' . preg_replace( '#^https?://#', '', $blog_id );
      Severity: Minor
      Found in Web.Admin/2014/wordpress/wp-admin/includes/class-wp-importer.php - About 1 hr 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 the_media_upload_tabs has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
      Open

      function the_media_upload_tabs() {
          global $redir_tab;
          $tabs = media_upload_tabs();
      
          if ( !empty($tabs) ) {
      Severity: Minor
      Found in Web.Admin/2014/wordpress/wp-admin/includes/media.php - About 1 hr 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 add_user has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
      Open

      function add_user() {
          if ( func_num_args() ) { // The hackiest hack that ever did hack
              global $current_user, $wp_roles;
              $user_id = (int) func_get_arg( 0 );
      
      
      Severity: Minor
      Found in Web.Admin/2014/wordpress/wp-admin/includes/user.php - About 1 hr 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 after has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
      Open

          function after() {
              $this->decrement_update_count( 'theme' );
      
              $update_actions = array();
              if ( ! empty( $this->upgrader->result['destination_name'] ) && $theme_info = $this->upgrader->theme_info() ) {

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

      function add_menu_classes($menu) {
      
          $first = $lastorder = false;
          $i = 0;
          $mc = count($menu);
      Severity: Minor
      Found in Web.Admin/2014/wordpress/wp-admin/includes/menu.php - About 1 hr 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 has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
      Open

          function get($remotefile, $localfile=NULL, $rest=0) {
              if(is_null($localfile)) $localfile=$remotefile;
              if (@file_exists($localfile)) $this->SendMSG("Warning : local file will be overwritten");
              $fp = @fopen($localfile, "w");
              if (!$fp) {
      Severity: Minor
      Found in Web.Admin/2014/wordpress/wp-admin/includes/class-ftp.php - About 1 hr 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