CaffGeek/MBACNationals

View on GitHub

Showing 5,566 of 7,504 total issues

Method add has 53 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function add( $args = '' ) {
        $defaults = array(
            'what' => 'object', 'action' => false,
            'id' => '0', 'old_id' => false,
            'position' => 1,
Severity: Major
Found in Web.Admin/2014/wordpress/wp-includes/class-wp-ajax-response.php - About 2 hrs to fix

    Method update_blog_details has 53 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function update_blog_details( $blog_id, $details = array() ) {
        global $wpdb;
    
        if ( empty($details) )
            return false;
    Severity: Major
    Found in Web.Admin/2014/wordpress/wp-includes/ms-blogs.php - About 2 hrs to fix

      Method add has 53 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function add( $args = '' ) {
              $defaults = array(
                  'what' => 'object', 'action' => false,
                  'id' => '0', 'old_id' => false,
                  'position' => 1,
      Severity: Major
      Found in Web.Admin/2014/wordpress/wp-includes/classes.php - About 2 hrs to fix

        Function index has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
        Open

            index: function(parentNode, reverse, ofType) {
              parentNode._counted = true;
              if (reverse) {
                for (var nodes = parentNode.childNodes, i = nodes.length - 1, j = 1; i >= 0; i--) {
                  var node = nodes[i];
        Severity: Minor
        Found in Web.Admin/2014/wordpress/wp-includes/js/prototype.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 getAnchorPosition has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
        Open

        function getAnchorPosition(anchorname) {
            // This function will return an Object with x and y properties
            var useWindow=false;
            var coordinates=new Object();
            var x=0,y=0;
        Severity: Minor
        Found in Web.Admin/2014/wordpress/wp-includes/js/colorpicker.dev.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 setup has a Cognitive Complexity of 16 (exceeds 5 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) )

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

        function init() {
            var pl = "", f, val;
            var type = "flash", fe, i;
        
            ed = tinyMCEPopup.editor;

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

            metaHandler : function(evt) {
                keyCode = evt.keyCode;
                
                if(keyCode==9 || evt.tabKey) { 
                    CodePress.snippets();
        Severity: Minor
        Found in Web.Admin/2014/wordpress/wp-includes/js/codepress/engines/msie.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 forceReRender has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
        Open

        },forceReRender:function(){
        if(this.isIE||this.isWebKit){
        var n=document.createTextNode(" ");
        var d,el,fixEL,i;
        if(this.isIE){
        Severity: Minor
        Found in Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.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 index has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
        Open

            index: function(parentNode, reverse, ofType) {
              parentNode._counted = true;
              if (reverse) {
                for (var nodes = parentNode.childNodes, i = nodes.length - 1, j = 1; i >= 0; i--) {
                  var node = nodes[i];
        Severity: Minor
        Found in Web.Admin/2014/wordpress/wp-includes/js/scriptaculous/prototype.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 updateDrag has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
        Open

          updateDrag: function(event, pointer) {
            if(!this.dragging) this.startDrag(event);
            
            if(!this.options.quiet){
              Position.prepare();
        Severity: Minor
        Found in Web.Admin/2014/wordpress/wp-includes/js/scriptaculous/dragdrop.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_Filesystem_SSH2 has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
        Open

            function WP_Filesystem_SSH2($opt='') {
                $this->method = 'ssh2';
                $this->errors = new WP_Error();
        
                //Check if possible to use ssh2 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 display_plugins_table has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
        Open

        function display_plugins_table($plugins, $page = 1, $totalpages = 1){
            $type = isset($_REQUEST['type']) ? stripslashes( $_REQUEST['type'] ) : '';
            $term = isset($_REQUEST['s']) ? stripslashes( $_REQUEST['s'] ) : '';
        
            $plugins_allowedtags = array('a' => array('href' => array(),'title' => array(), 'target' => array()),
        Severity: Minor
        Found in Web.Admin/2014/wordpress/wp-admin/includes/plugin-install.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 update_core has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
        Open

        function update_core($from, $to) {
            global $wp_filesystem, $_old_files, $wpdb;
        
            @set_time_limit( 300 );
        
        
        Severity: Minor
        Found in Web.Admin/2014/wordpress/wp-admin/includes/update-core.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_save_nav_menu_items has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
        Open

        function wp_save_nav_menu_items( $menu_id = 0, $menu_data = array() ) {
            $menu_id = (int) $menu_id;
            $items_saved = array();
        
            if ( 0 == $menu_id || is_nav_menu( $menu_id ) ) {
        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 connect has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
        Open

            function connect($server=NULL) {
                if(!empty($server)) {
                    if(!$this->SetServer($server)) return false;
                }
                if($this->_ready) return true;
        Severity: Minor
        Found in Web.Admin/2014/wordpress/wp-admin/includes/class-ftp.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_get_comment_list has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
        Open

        function _wp_get_comment_list( $status = '', $s = false, $start, $num, $post = 0, $type = '' ) {
            global $wpdb;
        
            $start = abs( (int) $start );
            $num = (int) $num;
        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 wp_insert_category has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
        Open

        function wp_insert_category($catarr, $wp_error = false) {
            $cat_defaults = array('cat_ID' => 0, 'cat_name' => '', 'category_description' => '', 'category_nicename' => '', 'category_parent' => '');
            $catarr = wp_parse_args($catarr, $cat_defaults);
            extract($catarr, EXTR_SKIP);
        
        
        Severity: Minor
        Found in Web.Admin/2014/wordpress/wp-admin/includes/taxonomy.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_dashboard_quick_press has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
        Open

        function wp_dashboard_quick_press() {
            $drafts = false;
            if ( 'post' === strtolower( $_SERVER['REQUEST_METHOD'] ) && isset( $_POST['action'] ) && 0 === strpos( $_POST['action'], 'post-quickpress' ) && (int) $_POST['post_ID'] ) {
                $view = get_permalink( $_POST['post_ID'] );
                $edit = esc_url( get_edit_post_link( $_POST['post_ID'] ) );
        Severity: Minor
        Found in Web.Admin/2014/wordpress/wp-admin/includes/dashboard.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_ajax_upload_attachment has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
        Open

        function wp_ajax_upload_attachment() {
            check_ajax_referer( 'media-form' );
        
            if ( ! current_user_can( 'upload_files' ) )
                wp_die();
        Severity: Minor
        Found in Web.Admin/2014/wordpress/wp-admin/includes/ajax-actions.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