CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

Function setup has 69 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    setup : function() {
        var t = this, h, c, el, id, link, fname, f = document.forms[0], ed = tinyMCEPopup.editor, d = t.I('img_demo'), dom = tinyMCEPopup.dom, DL, caption = '';
        document.dir = tinyMCEPopup.editor.getParam('directionality','');

        if ( tinyMCEPopup.editor.getParam('wpeditimage_disable_captions', false) )

    Method prepare_items has 69 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function prepare_items() {
            include( ABSPATH . 'wp-admin/includes/theme-install.php' );
    
            global $tabs, $tab, $paged, $type, $theme_field_defaults;
            wp_reset_vars( array( 'tab' ) );

      Method posts2wp has 69 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function posts2wp($posts='')
          {
              // General Housekeeping
              global $wpdb;
              $count = 0;
      Severity: Major
      Found in Web.Admin/2014/wordpress/wp-admin/import/textpattern.php - About 2 hrs to fix

        Method prepare_simplepie_object_for_cache has 69 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            protected static function prepare_simplepie_object_for_cache($data)
            {
                $items = $data->get_items();
                $items_by_id = array();
        
        
        Severity: Major
        Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Cache/DB.php - About 2 hrs to fix

          Method diff has 69 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function diff($from_lines, $to_lines)
              {
                  array_walk($from_lines, array('Text_Diff', 'trimNewlines'));
                  array_walk($to_lines, array('Text_Diff', 'trimNewlines'));
          
          
          Severity: Major
          Found in Web.Admin/2014/wordpress/wp-includes/Text/Diff/Engine/shell.php - About 2 hrs to fix

            Method send_headers has 69 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function send_headers() {
                    $headers = array('X-Pingback' => get_bloginfo('pingback_url'));
                    $status = null;
                    $exit_required = false;
            
            
            Severity: Major
            Found in Web.Admin/2014/wordpress/wp-includes/class-wp.php - About 2 hrs to fix

              Method prepare_simplepie_object_for_cache has 69 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function prepare_simplepie_object_for_cache($data)
                  {
                      $items = $data->get_items();
                      $items_by_id = array();
              
              
              Severity: Major
              Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 2 hrs to fix

                Method wp_die has 69 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function wp_die( $message, $title = '', $args = array() ) {
                    global $wp_locale;
                
                    $defaults = array( 'response' => 500 );
                    $r = wp_parse_args($args, $defaults);
                Severity: Major
                Found in Web.Admin/2014/wordpress/wp-includes/functions.php - About 2 hrs to fix

                  Method get_permalink has 69 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function get_permalink($id = 0, $leavename = false) {
                      $rewritecode = array(
                          '%year%',
                          '%monthnum%',
                          '%day%',
                  Severity: Major
                  Found in Web.Admin/2014/wordpress/wp-includes/link-template.php - About 2 hrs to fix

                    Method wp_list_authors has 69 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function wp_list_authors($args = '') {
                        global $wpdb;
                    
                        $defaults = array(
                            'optioncount' => false, 'exclude_admin' => true,
                    Severity: Major
                    Found in Web.Admin/2014/wordpress/wp-includes/author-template.php - About 2 hrs to fix

                      Function InlineWindowManager has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
                      Open

                      tinymce.WPWindowManager = tinymce.InlineWindowManager = function( editor ) {
                          if ( this.wp ) {
                              return this;
                          }
                      
                      

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

                          getAttrib : function(e, at) {
                              var ed = tinyMCEPopup.editor, dom = ed.dom, v, v2;
                      
                              if (ed.settings.inline_styles) {
                                  switch (at) {

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

                        startDrag: function(event) {
                          if (Event.isLeftClick(event)) {
                            if (!this.disabled){
                              this.active = true;
                              
                      Severity: Minor
                      Found in Web.Admin/2014/wordpress/wp-includes/js/scriptaculous/slider.js - About 2 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_get_nav_menu_to_edit has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
                      Open

                      function wp_get_nav_menu_to_edit( $menu_id = 0 ) {
                          $menu = wp_get_nav_menu_object( $menu_id );
                      
                          // If the menu exists, get its items.
                          if ( is_nav_menu( $menu ) ) {
                      Severity: Minor
                      Found in Web.Admin/2014/wordpress/wp-admin/includes/nav-menu.php - About 2 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 upgrade_100 has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
                      Open

                      function upgrade_100() {
                          global $wpdb;
                      
                          // Get the title and ID of every post, post_name to check if it already has a value
                          $posts = $wpdb->get_results("SELECT ID, post_title, post_name FROM $wpdb->posts WHERE post_name = ''");
                      Severity: Minor
                      Found in Web.Admin/2014/wordpress/wp-admin/includes/upgrade.php - About 2 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_handle_sideload has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
                      Open

                      function wp_handle_sideload( &$file, $overrides = false ) {
                          // The default error handler.
                          if (! function_exists( 'wp_handle_upload_error' ) ) {
                              function wp_handle_upload_error( &$file, $message ) {
                                  return array( 'error'=>$message );
                      Severity: Minor
                      Found in Web.Admin/2014/wordpress/wp-admin/includes/file.php - About 2 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 meta_box_prefs has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
                      Open

                      function meta_box_prefs( $screen ) {
                          global $wp_meta_boxes;
                      
                          if ( is_string( $screen ) )
                              $screen = convert_to_screen( $screen );
                      Severity: Minor
                      Found in Web.Admin/2014/wordpress/wp-admin/includes/screen.php - About 2 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 upgrade_130 has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
                      Open

                      function upgrade_130() {
                          global $wpdb;
                      
                          // Remove extraneous backslashes.
                          $posts = $wpdb->get_results("SELECT ID, post_title, post_content, post_excerpt, guid, post_date, post_name, post_status, post_author FROM $wpdb->posts");
                      Severity: Minor
                      Found in Web.Admin/2014/wordpress/wp-admin/includes/upgrade.php - About 2 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 link_cat_row has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
                      Open

                      function link_cat_row( $category, $name_override = false ) {
                          static $row_class = '';
                      
                          if ( !$category = get_term( $category, 'link_category', OBJECT, 'display' ) )
                              return false;
                      Severity: Minor
                      Found in Web.Admin/2014/wordpress/wp-admin/includes/template.php - About 2 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 print_column_headers has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
                      Open

                          function print_column_headers( $with_id = true ) {
                              list( $columns, $hidden, $sortable ) = $this->get_column_info();
                      
                              $current_url = set_url_scheme( 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
                              $current_url = remove_query_arg( 'paged', $current_url );
                      Severity: Minor
                      Found in Web.Admin/2014/wordpress/wp-admin/includes/class-wp-list-table.php - About 2 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