CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

Method privAdd has 98 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  function privAdd($p_filedescr_list, &$p_result_list, &$p_options)
  {
    $v_result=1;
    $v_list_detail = array();

Severity: Major
Found in Web.Admin/2014/wordpress/wp-admin/includes/class-pclzip.php - About 3 hrs to fix

    Method _wp_menu_output has 98 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function _wp_menu_output( $menu, $submenu, $submenu_as_parent = true ) {
        global $self, $parent_file, $submenu_file, $plugin_page, $pagenow;
    
        $first = true;
        // 0 = name, 1 = capability, 2 = file, 3 = class, 4 = id, 5 = icon src
    Severity: Major
    Found in Web.Admin/2014/wordpress/wp-admin/menu-header.php - About 3 hrs to fix

      Method Analyze has 98 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function Analyze() {
              $info = &$this->getid3->info;
      
              $initialOffset = $info['avdataoffset'];
      
      
      Severity: Major
      Found in Web.Admin/2014/wordpress/wp-includes/ID3/module.audio.mp3.php - About 3 hrs to fix

        Method wp_update_nav_menu_item has 98 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function wp_update_nav_menu_item( $menu_id = 0, $menu_item_db_id = 0, $menu_item_data = array() ) {
            $menu_id = (int) $menu_id;
            $menu_item_db_id = (int) $menu_item_db_id;
        
            // make sure that we don't convert non-nav_menu_item objects into nav_menu_item objects
        Severity: Major
        Found in Web.Admin/2014/wordpress/wp-includes/nav-menu.php - About 3 hrs to fix

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

              function request( $url, $args = array() ) {
                  global $wp_version;
          
                  $defaults = array(
                      'method' => 'GET',
          Severity: Major
          Found in Web.Admin/2014/wordpress/wp-includes/class-http.php - About 3 hrs to fix

            Function PclZipUtilCopyBlock has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
            Open

              function PclZipUtilCopyBlock($p_src, $p_dest, $p_size, $p_mode=0)
              {
                $v_result = 1;
            
                if ($p_mode==0)
            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 make_site_theme_from_oldschool has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
            Open

            function make_site_theme_from_oldschool($theme_name, $template) {
                $home_path = get_home_path();
                $site_dir = WP_CONTENT_DIR . "/themes/$template";
            
                if (! file_exists("$home_path/index.php"))
            Severity: Minor
            Found in Web.Admin/2014/wordpress/wp-admin/includes/upgrade.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 _cat_rows has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
            Open

            function _cat_rows( $parent = 0, $level = 0, $categories, &$children, $page = 1, $per_page = 20, &$count ) {
            
                $start = ($page - 1) * $per_page;
                $end = $start + $per_page;
                ob_start();
            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 image_edit_apply_changes has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
            Open

            function image_edit_apply_changes($img, $changes) {
            
                if ( !is_array($changes) )
                    return $img;
            
            
            Severity: Minor
            Found in Web.Admin/2014/wordpress/wp-admin/includes/image-edit.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_insert_user has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
            Open

            function wp_insert_user($userdata) {
                global $wpdb;
            
                extract($userdata, EXTR_SKIP);
            
            
            Severity: Minor
            Found in Web.Admin/2014/wordpress/wp-includes/registration.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 ChannelsBitratePlaytimeCalculations has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
            Open

                public function ChannelsBitratePlaytimeCalculations() {
            
                    // set channelmode on audio
                    if (!empty($this->info['audio']['channelmode']) || !isset($this->info['audio']['channels'])) {
                        // ignore
            Severity: Minor
            Found in Web.Admin/2014/wordpress/wp-includes/ID3/getid3.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 hash_data has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
            Open

                public static function hash_data($file, $offset, $end, $algorithm) {
                    static $tempdir = '';
                    if (!self::intValueSupported($end)) {
                        return false;
                    }
            Severity: Minor
            Found in Web.Admin/2014/wordpress/wp-includes/ID3/getid3.lib.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 Analyze has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
            Open

                public function Analyze() {
                    $info = &$this->getid3->info;
            
                    // http://www.volweb.cz/str/tags.htm
            
            
            Severity: Minor
            Found in Web.Admin/2014/wordpress/wp-includes/ID3/module.tag.lyrics3.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 search_elements_by_tag has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
            Open

                protected function search_elements_by_tag($name, &$done, $feeds)
                {
                    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 request has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
            Open

                function request($url, $args = array()) {
                    $defaults = array(
                        'method' => 'GET', 'timeout' => 5,
                        'redirection' => 5, 'httpversion' => '1.0',
                        'blocking' => true,
            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 request has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
            Open

                function request($url, $args = array()) {
                    $defaults = array(
                        'method' => 'GET', 'timeout' => 5,
                        'redirection' => 5, 'httpversion' => '1.0',
                        'blocking' => true,
            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_get_nav_menu_items has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
            Open

            function wp_get_nav_menu_items( $menu, $args = array() ) {
                $menu = wp_get_nav_menu_object( $menu );
            
                if ( ! $menu )
                    return false;
            Severity: Minor
            Found in Web.Admin/2014/wordpress/wp-includes/nav-menu.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 url_to_postid has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
            Open

            function url_to_postid($url) {
                global $wp_rewrite;
            
                $url = apply_filters('url_to_postid', $url);
            
            
            Severity: Minor
            Found in Web.Admin/2014/wordpress/wp-includes/rewrite.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

            Identical blocks of code found in 2 locations. Consider refactoring.
            Open

            {var xa=x1,xb=x2,ya=y1,yb=y2;if(x2<x1)
            {xa=x2;xb=x1;}
            if(y2<y1)
            {ya=y2;yb=y1;}
            return[Math.round(xa),Math.round(ya),Math.round(xb),Math.round(yb)];};function getRect()
            Web.Admin/2014/wordpress/wp-includes/js/jcrop/jquery.Jcrop.dev.js on lines 344..357

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 113.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Identical blocks of code found in 2 locations. Consider refactoring.
            Open

                {
                    var c = Coords.getFixed();
                    if (c.w > options.minSelect[0] && c.h > options.minSelect[1])
                    {
                        Selection.enableHandles();
            Web.Admin/2014/wordpress/wp-includes/js/jcrop/jquery.Jcrop.js on lines 130..134

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 113.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Severity
            Category
            Status
            Source
            Language