CaffGeek/MBACNationals

View on GitHub

Showing 5,566 of 7,504 total issues

File wp-cat2tag.php has 345 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
/**
 * WordPress Categories to Tags Converter.
 *
 * @package WordPress
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/import/wp-cat2tag.php - About 4 hrs to fix

    Function setup has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
    Open

        setup : function() {
            var t = this, a, ed = t.editor, g, columns, link, order, orderby;
            if ( ! t.mcemode ) return;
    
            t.restoreSelection();
    Severity: Minor
    Found in Web.Admin/2014/wordpress/wp-admin/js/gallery.dev.js - About 4 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 parselisting has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
    Open

        function parselisting($line) {
            $is_windows = ($this->OS_remote == FTP_OS_Windows);
            if ($is_windows && preg_match("/([0-9]{2})-([0-9]{2})-([0-9]{2}) +([0-9]{2}):([0-9]{2})(AM|PM) +([0-9]+|<DIR>) +(.+)/",$line,$lucifer)) {
                $b = array();
                if ($lucifer[3]<70) { $lucifer[3]+=2000; } else { $lucifer[3]+=1900; } // 4digit year fix
    Severity: Minor
    Found in Web.Admin/2014/wordpress/wp-admin/includes/class-ftp.php - About 4 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 edit_post has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
    Open

    function edit_post( $post_data = null ) {
    
        if ( empty($post_data) )
            $post_data = &$_POST;
    
    
    Severity: Minor
    Found in Web.Admin/2014/wordpress/wp-admin/includes/post.php - About 4 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 parselisting has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
    Open

        function parselisting($line) {
            static $is_windows;
            if ( is_null($is_windows) )
                $is_windows = strpos( strtolower(ftp_systype($this->link)), 'win') !== 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 wp_write_post has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
    Open

    function wp_write_post() {
        global $user_ID;
    
        if ( 'page' == $_POST['post_type'] ) {
            if ( !current_user_can( 'edit_pages' ) )
    Severity: Minor
    Found in Web.Admin/2014/wordpress/wp-admin/includes/post.php - About 4 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_nav_menu_update_menu_items has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
    Open

    function wp_nav_menu_update_menu_items ( $nav_menu_selected_id, $nav_menu_selected_title ) {
        $unsorted_menu_items = wp_get_nav_menu_items( $nav_menu_selected_id, array( 'orderby' => 'ID', 'output' => ARRAY_A, 'output_key' => 'ID', 'post_status' => 'draft,publish' ) );
    
        $menu_items = array();
        // Index menu items by db ID
    Severity: Minor
    Found in Web.Admin/2014/wordpress/wp-admin/includes/nav-menu.php - About 4 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 do_meta_boxes has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
    Open

    function do_meta_boxes($page, $context, $object) {
        global $wp_meta_boxes;
        static $already_sorted = false;
    
        //do_action('do_meta_boxes', $page, $context, $object);
    Severity: Minor
    Found in Web.Admin/2014/wordpress/wp-admin/includes/template.php - About 4 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 paginate_links has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
    Open

    function paginate_links( $args = '' ) {
        $defaults = array(
            'base' => '%_%', // http://example.com/all_posts.php%_% : %_% is replaced by format (below)
            'format' => '?page=%#%', // ?page=%#% : %#% is replaced by the page number
            'total' => 1,
    Severity: Minor
    Found in Web.Admin/2014/wordpress/wp-includes/general-template.php - About 4 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 tag_open has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
    Open

        public function tag_open($parser, $tag, $attributes)
        {
            list($this->namespace[], $this->element[]) = $this->split_ns($tag);
    
            $attribs = array();
    Severity: Minor
    Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Parser.php - About 4 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 check_ipv6 has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
    Open

        public static function check_ipv6($ip)
        {
            $ip = self::uncompress($ip);
            list($ipv6, $ipv4) = self::split_v6_v4($ip);
            $ipv6 = explode(':', $ipv6);
    Severity: Minor
    Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Net/IPv6.php - About 4 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 is_active_widget has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
    Open

    function is_active_widget($callback = false, $widget_id = false, $id_base = false, $skip_inactive = true) {
        global $wp_registered_widgets;
    
        $sidebars_widgets = wp_get_sidebars_widgets();
    
    
    Severity: Minor
    Found in Web.Admin/2014/wordpress/wp-includes/widgets.php - About 4 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 render has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
    Open

        function render($diff)
        {
            $xi = $yi = 1;
            $block = false;
            $context = array();
    Severity: Minor
    Found in Web.Admin/2014/wordpress/wp-includes/Text/Diff/Renderer.php - About 4 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_the_category_list has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
    Open

    function get_the_category_list( $separator = '', $parents='', $post_id = false ) {
        global $wp_rewrite;
        $categories = get_the_category( $post_id );
        if ( empty( $categories ) )
            return apply_filters( 'the_category', __( 'Uncategorized' ), $separator, $parents );
    Severity: Minor
    Found in Web.Admin/2014/wordpress/wp-includes/category-template.php - About 4 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_favicon has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
    Open

        function get_favicon()
        {
            if ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'icon'))
            {
                return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($return[0]));
    Severity: Minor
    Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 4 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_network_by_path has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
    Open

    function get_network_by_path( $domain, $path, $segments = null ) {
        global $wpdb;
    
        $domains = $exact_domains = array( $domain );
        $pieces = explode( '.', $domain );
    Severity: Minor
    Found in Web.Admin/2014/wordpress/wp-includes/ms-load.php - About 4 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 sanitize_user_field has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
    Open

    function sanitize_user_field($field, $value, $user_id, $context) {
        $int_fields = array('ID');
        if ( in_array($field, $int_fields) )
            $value = (int) $value;
    
    
    Severity: Minor
    Found in Web.Admin/2014/wordpress/wp-includes/user.php - About 4 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 EncodeQP has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
    Open

      function EncodeQP( $input = '', $line_max = 76, $space_conv = false ) {
        $hex = array('0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F');
        $lines = preg_split('/(?:\r\n|\r|\n)/', $input);
        $eol = "\r\n";
        $escape = '=';
    Severity: Minor
    Found in Web.Admin/2014/wordpress/wp-includes/class-phpmailer.php - About 4 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

    Method request has 106 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function request($url, $args = array()) {
            $defaults = array(
                'method' => 'GET', 'timeout' => 5,
                'redirection' => 5, 'httpversion' => '1.0',
                'blocking' => true,
    Severity: Major
    Found in Web.Admin/2014/wordpress/wp-includes/http.php - About 4 hrs to fix

      File module.audio.flac.php has 342 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      <?php
      /////////////////////////////////////////////////////////////////
      /// getID3() by James Heinrich <info@getid3.org>               //
      //  available at http://getid3.sourceforge.net                 //
      //            or http://www.getid3.org                         //
      Severity: Minor
      Found in Web.Admin/2014/wordpress/wp-includes/ID3/module.audio.flac.php - About 4 hrs to fix
        Severity
        Category
        Status
        Source
        Language