CaffGeek/MBACNationals

View on GitHub

Showing 5,566 of 7,504 total issues

Method wp_save_post_revision has 44 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function wp_save_post_revision( $post_id ) {
    if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )
        return;

    if ( ! $post = get_post( $post_id ) )
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/revision.php - About 1 hr to fix

    Method make_thumb has 44 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function make_thumb($folder,$file,$dest,$thumb_width) {
    
        $ext = strtolower(pathinfo($file, PATHINFO_EXTENSION));
        
        switch($ext)
    Severity: Minor
    Found in Web.Admin/2014/foliogallery.php - About 1 hr to fix

      Method get_queried_object has 44 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function get_queried_object() {
              if (isset($this->queried_object)) {
                  return $this->queried_object;
              }
      
      
      Severity: Minor
      Found in Web.Admin/2014/wordpress/wp-includes/query.php - About 1 hr to fix

        Function go has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
        Open

            go : function(id, mode) {
                id = id || 'content';
                mode = mode || this.mode || '';
        
                var ed, qt = this.I('quicktags'), H = this.I('edButtonHTML'), P = this.I('edButtonPreview'), ta = this.I(id);
        Severity: Minor
        Found in Web.Admin/2014/wordpress/wp-admin/js/editor.dev.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 request has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
        Open

          request: function(url) {
            this.url = url;
            this.method = this.options.method;
            var params = Object.clone(this.options.parameters);
        
        
        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 setStyle has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
        Open

          setStyle: function(element, styles) {
            element = $(element);
            var elementStyle = element.style, match;
            if (Object.isString(styles)) {
              element.style.cssText += ';' + styles;
        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 extend has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
        Open

        Element.extend = (function() {
          if (Prototype.BrowserFeatures.SpecificElementExtensions)
            return Prototype.K;
        
          var Methods = { }, ByTag = Element.Methods.ByTag;
        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 setStyle has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
        Open

          setStyle: function(element, styles) {
            element = $(element);
            var elementStyle = element.style, match;
            if (Object.isString(styles)) {
              element.style.cssText += ';' + styles;
        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 request has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
        Open

          request: function(url) {
            this.url = url;
            this.method = this.options.method;
            var params = Object.clone(this.options.parameters);
        
        
        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 extend has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
        Open

        Element.extend = (function() {
          if (Prototype.BrowserFeatures.SpecificElementExtensions)
            return Prototype.K;
        
          var Methods = { }, ByTag = Element.Methods.ByTag;
        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 wp_dropdown_cats has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
        Open

        function wp_dropdown_cats( $currentcat = 0, $currentparent = 0, $parent = 0, $level = 0, $categories = 0 ) {
            _deprecated_function( __FUNCTION__, '3.0', 'wp_dropdown_categories()' );
            if (!$categories )
                $categories = get_categories( array('hide_empty' => 0) );
        
        
        Severity: Minor
        Found in Web.Admin/2014/wordpress/wp-admin/includes/deprecated.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_views has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
        Open

            function get_views() {
                global $totals, $status;
        
                $status_links = array();
                foreach ( $totals as $type => $count ) {

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

            function display_rows() {
                $themes = $this->items;
        
                foreach ( $themes as $theme ):
                    ?><div class="available-theme"><?php

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

            function WP_Filesystem_FTPext($opt='') {
                $this->method = 'ftpext';
                $this->errors = new WP_Error();
        
                //Check if possible to use ftp functions.

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

        function wp_dropdown_cats( $currentcat = 0, $currentparent = 0, $parent = 0, $level = 0, $categories = 0 ) {
            if (!$categories )
                $categories = get_categories( array('hide_empty' => 0) );
        
            if ( $categories ) {
        Severity: Minor
        Found in Web.Admin/2014/wordpress/wp-admin/includes/template.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 wp_ajax_save_attachment_order has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
        Open

        function wp_ajax_save_attachment_order() {
            if ( ! isset( $_REQUEST['post_id'] ) )
                wp_send_json_error();
        
            if ( ! $post_id = absint( $_REQUEST['post_id'] ) )
        Severity: Minor
        Found in Web.Admin/2014/wordpress/wp-admin/includes/ajax-actions.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_option_whitelist has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
        Open

        function add_option_whitelist( $new_options, $options = '' ) {
            if( $options == '' ) {
                global $whitelist_options;
            } else {
                $whitelist_options = $options;
        Severity: Minor
        Found in Web.Admin/2014/wordpress/wp-admin/includes/plugin.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 _wp_ajax_delete_comment_response has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
        Open

        function _wp_ajax_delete_comment_response( $comment_id, $delta = -1 ) {
            $total    = isset( $_POST['_total'] )    ? (int) $_POST['_total']    : 0;
            $per_page = isset( $_POST['_per_page'] ) ? (int) $_POST['_per_page'] : 0;
            $page     = isset( $_POST['_page'] )     ? (int) $_POST['_page']     : 0;
            $url      = isset( $_POST['_url'] )      ? esc_url_raw( $_POST['_url'] ) : '';
        Severity: Minor
        Found in Web.Admin/2014/wordpress/wp-admin/includes/ajax-actions.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 wp_ajax_add_menu_item has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
        Open

        function wp_ajax_add_menu_item() {
            check_ajax_referer( 'add-menu_item', 'menu-settings-column-nonce' );
        
            if ( ! current_user_can( 'edit_theme_options' ) )
                wp_die( -1 );
        Severity: Minor
        Found in Web.Admin/2014/wordpress/wp-admin/includes/ajax-actions.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 load_image_to_edit has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
        Open

        function load_image_to_edit($post_id, $mime_type, $size = 'full') {
            $filepath = get_attached_file($post_id);
        
            if ( $filepath && file_exists($filepath) ) {
                if ( 'full' != $size && ( $data = image_get_intermediate_size($post_id, $size) ) )
        Severity: Minor
        Found in Web.Admin/2014/wordpress/wp-admin/includes/image-edit.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