CaffGeek/MBACNationals

View on GitHub

Showing 5,566 of 7,504 total issues

Function Hash has 94 lines of code (exceeds 25 allowed). Consider refactoring.
Open

var Hash = Class.create(Enumerable, (function() {
  if (function() {
    var i = 0, Test = function(value) { this.key = value };
    Test.prototype.key = 'foo';
    for (var property in new Test('bar')) i++;
Severity: Major
Found in Web.Admin/2014/wordpress/wp-includes/js/prototype.js - About 3 hrs to fix

    Function Hash has 94 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    var Hash = Class.create(Enumerable, (function() {
      if (function() {
        var i = 0, Test = function(value) { this.key = value };
        Test.prototype.key = 'foo';
        for (var property in new Test('bar')) i++;
    Severity: Major
    Found in Web.Admin/2014/wordpress/wp-includes/js/scriptaculous/prototype.js - About 3 hrs to fix

      Method remove_iunreserved_percent_encoded has 94 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          protected function remove_iunreserved_percent_encoded($match)
          {
              // As we just have valid percent encoded sequences we can just explode
              // and ignore the first member of the returned array (an empty string).
              $bytes = explode('%', $match[0]);
      Severity: Major
      Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/IRI.php - About 3 hrs to fix

        Method gallery_shortcode has 94 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function gallery_shortcode($attr) {
            global $post, $wp_locale;
        
            static $instance = 0;
            $instance++;
        Severity: Major
        Found in Web.Admin/2014/wordpress/wp-includes/media.php - About 3 hrs to fix

          Function PclZipUtilPathInclusion has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
          Open

            function PclZipUtilPathInclusion($p_dir, $p_path)
            {
              $v_result = 1;
          
              // ----- Look for path beginning by ./
          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 display_themes has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
          Open

          function display_themes($themes, $page = 1, $totalpages = 1) {
              global $themes_allowedtags;
          
              $type = isset($_REQUEST['type']) ? stripslashes( $_REQUEST['type'] ) : '';
              $term = isset($_REQUEST['s']) ? stripslashes( $_REQUEST['s'] ) : '';
          Severity: Minor
          Found in Web.Admin/2014/wordpress/wp-admin/includes/theme-install.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 single_row has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
          Open

              function single_row( $user_object, $style = '', $role = '', $numposts = 0 ) {
                  global $wp_roles;
          
                  if ( !( is_object( $user_object ) && is_a( $user_object, 'WP_User' ) ) )
                      $user_object = get_userdata( (int) $user_object );

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

          function user_row( $user_object, $style = '', $role = '' ) {
              global $wp_roles;
          
              $current_user = wp_get_current_user();
          
          
          Severity: Minor
          Found in Web.Admin/2014/wordpress/wp-admin/includes/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

          Function wp_ajax_delete_comment has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
          Open

          function wp_ajax_delete_comment() {
              $id = isset( $_POST['id'] ) ? (int) $_POST['id'] : 0;
          
              if ( !$comment = get_comment( $id ) )
                  wp_die( time() );
          Severity: Minor
          Found in Web.Admin/2014/wordpress/wp-admin/includes/ajax-actions.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_generate_attachment_metadata has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
          Open

          function wp_generate_attachment_metadata( $attachment_id, $file ) {
              $attachment = get_post( $attachment_id );
          
              $metadata = array();
              if ( preg_match('!^image/!', get_post_mime_type( $attachment )) && file_is_displayable_image($file) ) {
          Severity: Minor
          Found in Web.Admin/2014/wordpress/wp-admin/includes/image.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 dirlist has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
          Open

              function dirlist($path = '.', $include_hidden = true, $recursive = false) {
                  if ( $this->is_file($path) ) {
                      $limit_file = basename($path);
                      $path = dirname($path) . '/';
                  } else {

          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 26 (exceeds 5 allowed). Consider refactoring.
          Open

              function display_rows() {
                  global $cat_id;
          
                  $alt = 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 retrieve_widgets has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
          Open

          function retrieve_widgets() {
              global $wp_registered_widget_updates, $wp_registered_sidebars, $sidebars_widgets, $wp_registered_widgets;
          
              $_sidebars_widgets = array();
              $sidebars = array_keys($wp_registered_sidebars);
          Severity: Minor
          Found in Web.Admin/2014/wordpress/wp-admin/widgets.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_term_children has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
          Open

          function &_get_term_children($term_id, $terms, $taxonomy) {
              $empty_array = array();
              if ( empty($terms) )
                  return $empty_array;
          
          
          Severity: Minor
          Found in Web.Admin/2014/wordpress/wp-includes/taxonomy.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_set_object_terms has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
          Open

          function wp_set_object_terms($object_id, $terms, $taxonomy, $append = false) {
              global $wpdb;
          
              $object_id = (int) $object_id;
          
          
          Severity: Minor
          Found in Web.Admin/2014/wordpress/wp-includes/taxonomy.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_links has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
          Open

              public function get_links()
              {
                  if ($this->dom === null)
                  {
                      throw new SimplePie_Exception('DOMDocument not found, unable to use locator');
          Severity: Minor
          Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Locator.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 import_from_reader has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
          Open

              function import_from_reader($reader) {
                  $endian_string = MO::get_byteorder($reader->readint32());
                  if (false === $endian_string) {
                      return false;
                  }
          Severity: Minor
          Found in Web.Admin/2014/wordpress/wp-includes/pomo/mo.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 request has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
          Open

              function request( $url, $args = array() ) {
                  global $wp_version;
          
                  $defaults = array(
                      'method' => 'GET',
          Severity: Minor
          Found in Web.Admin/2014/wordpress/wp-includes/http.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 _postTransport has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
          Open

              function &_postTransport( $args = array() ) {
                  static $working_transport, $blocking_transport, $nonblocking_transport;
          
                  if ( is_null($working_transport) ) {
                      if ( true === WP_Http_ExtHttp::test($args) ) {
          Severity: Minor
          Found in Web.Admin/2014/wordpress/wp-includes/http.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_generate_tag_cloud has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
          Open

          function wp_generate_tag_cloud( $tags, $args = '' ) {
              global $wp_rewrite;
              $defaults = array(
                  'smallest' => 8, 'largest' => 22, 'unit' => 'pt', 'number' => 0,
                  'format' => 'flat', 'separator' => "\n", 'orderby' => 'name', 'order' => 'ASC',
          Severity: Minor
          Found in Web.Admin/2014/wordpress/wp-includes/category-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

          Severity
          Category
          Status
          Source
          Language