CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

Similar blocks of code found in 3 locations. Consider refactoring.
Open

                            elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['restriction']))
                            {
                                foreach ($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['restriction'] as $restriction)
                                {
                                    $restriction_relationship = null;
Severity: Major
Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Item.php and 2 other locations - About 1 day to fix
Web.Admin/2014/wordpress/wp-includes/SimplePie/Item.php on lines 2252..2307
Web.Admin/2014/wordpress/wp-includes/SimplePie/Item.php on lines 2700..2729

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 249.

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

Similar blocks of code found in 3 locations. Consider refactoring.
Open

                            if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['category']))
                            {
                                foreach ((array) $content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['category'] as $category)
                                {
                                    $term = null;
Severity: Major
Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Item.php and 2 other locations - About 1 day to fix
Web.Admin/2014/wordpress/wp-includes/SimplePie/Item.php on lines 1934..1959
Web.Admin/2014/wordpress/wp-includes/SimplePie/Item.php on lines 2496..2521

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 249.

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

Similar blocks of code found in 3 locations. Consider refactoring.
Open

                            if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['restriction']))
                            {
                                foreach ($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['restriction'] as $restriction)
                                {
                                    $restriction_relationship = null;
Severity: Major
Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Item.php and 2 other locations - About 1 day to fix
Web.Admin/2014/wordpress/wp-includes/SimplePie/Item.php on lines 2278..2303
Web.Admin/2014/wordpress/wp-includes/SimplePie/Item.php on lines 2700..2729

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 249.

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

Similar blocks of code found in 3 locations. Consider refactoring.
Open

                        if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['restriction']))
                        {
                            foreach ($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['restriction'] as $restriction)
                            {
                                $restriction_relationship = null;
Severity: Major
Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Item.php and 2 other locations - About 1 day to fix
Web.Admin/2014/wordpress/wp-includes/SimplePie/Item.php on lines 2252..2307
Web.Admin/2014/wordpress/wp-includes/SimplePie/Item.php on lines 2278..2303

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 249.

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

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

        mainVideoPlaylistToolbar: function( view ) {
            var controller = this;

            this.selectionStatusToolbar( view );

Severity: Major
Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js and 1 other location - About 1 day to fix
Web.Admin/2014/wordpress/wp-includes/js/media-views.js on lines 2496..2520

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 198.

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

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

        mainPlaylistToolbar: function( view ) {
            var controller = this;

            this.selectionStatusToolbar( view );

Severity: Major
Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js and 1 other location - About 1 day to fix
Web.Admin/2014/wordpress/wp-includes/js/media-views.js on lines 2522..2546

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 198.

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

Method show_blogs has 203 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function show_blogs($iter = 0) {
        if ( empty($this->blogs) ) {
            $headers = array(
                "GET /feeds/default/blogs HTTP/1.0",
                "Host: www.blogger.com",
Severity: Major
Found in Web.Admin/2014/wordpress/wp-admin/import/blogger.php - About 1 day to fix

    Function PclZipUtilPathReduction has a Cognitive Complexity of 52 (exceeds 5 allowed). Consider refactoring.
    Open

      function PclZipUtilPathReduction($p_dir)
      {
        $v_result = "";
    
        // ----- Look for not empty path
    Severity: Minor
    Found in Web.Admin/2014/wordpress/wp-admin/includes/class-pclzip.php - About 1 day 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 media_upload_form_handler has a Cognitive Complexity of 52 (exceeds 5 allowed). Consider refactoring.
    Open

    function media_upload_form_handler() {
        check_admin_referer('media-form');
    
        $errors = null;
    
    
    Severity: Minor
    Found in Web.Admin/2014/wordpress/wp-admin/includes/media.php - About 1 day 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_admin_page_title has a Cognitive Complexity of 52 (exceeds 5 allowed). Consider refactoring.
    Open

    function get_admin_page_title() {
        global $title;
        global $menu;
        global $submenu;
        global $pagenow;
    Severity: Minor
    Found in Web.Admin/2014/wordpress/wp-admin/includes/plugin.php - About 1 day 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 kubrick_theme_page_head has 202 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function kubrick_theme_page_head() {
    ?>
    <script type="text/javascript" src="../wp-includes/js/colorpicker.js"></script>
    <script type='text/javascript'>
    // <![CDATA[
    Severity: Major
    Found in Web.Admin/2014/wordpress/wp-content/themes/default/functions.php - About 1 day to fix

      Method mw_editPost has 201 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function mw_editPost($args) {
      
              $this->escape($args);
      
              $post_ID     = (int) $args[0];
      Severity: Major
      Found in Web.Admin/2014/wordpress/xmlrpc.php - About 1 day to fix

        Method redirect_canonical has 201 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function redirect_canonical($requested_url=null, $do_redirect=true) {
            global $wp_rewrite, $is_IIS, $wp_query, $wpdb;
        
            if ( is_trackback() || is_search() || is_comments_popup() || is_admin() || $is_IIS || ( isset($_POST) && count($_POST) ) || is_preview() || is_robots() )
                return;
        Severity: Major
        Found in Web.Admin/2014/wordpress/wp-includes/canonical.php - About 1 day to fix

          Methods has 56 functions (exceeds 20 allowed). Consider refactoring.
          Open

          Element.Methods = {
            visible: function(element) {
              return $(element).style.display != 'none';
            },
          
          
          Severity: Major
          Found in Web.Admin/2014/wordpress/wp-includes/js/prototype.js - About 1 day to fix

            Function tb_show has 200 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function tb_show(caption, url, imageGroup) {//function called when the user clicks on a thickbox link
            
                try {
                    if (typeof document.body.style.maxHeight === "undefined") {//if IE 6
                        jQuery("body","html").css({height: "100%", width: "100%"});
            Severity: Major
            Found in Web.Admin/2014/wordpress/wp-includes/js/thickbox/thickbox.js - About 1 day to fix

              Methods has 56 functions (exceeds 20 allowed). Consider refactoring.
              Open

              Element.Methods = {
                visible: function(element) {
                  return $(element).style.display != 'none';
                },
              
              
              Severity: Major
              Found in Web.Admin/2014/wordpress/wp-includes/js/scriptaculous/prototype.js - About 1 day to fix

                Method GuessEncoderOptions has 200 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function GuessEncoderOptions() {
                        // shortcuts
                        $info = &$this->getid3->info;
                        if (!empty($info['mpeg']['audio'])) {
                            $thisfile_mpeg_audio = &$info['mpeg']['audio'];
                Severity: Major
                Found in Web.Admin/2014/wordpress/wp-includes/ID3/module.audio.mp3.php - About 1 day to fix

                  File cropper.js has 499 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  /**
                   * Copyright (c) 2006, David Spurr (http://www.defusion.org.uk/)
                   * All rights reserved.
                   *
                   * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
                  Severity: Minor
                  Found in Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.js - About 1 day to fix

                    File media.js has 498 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    tinyMCEPopup.requireLangPack();
                    
                    var oldWidth, oldHeight, ed, url;
                    
                    if (url = tinyMCEPopup.getParam("media_external_list_url"))

                      Similar blocks of code found in 3 locations. Consider refactoring.
                      Open

                                              if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['restriction']))
                                              {
                                                  foreach ($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['restriction'] as $restriction)
                                                  {
                                                      $restriction_relationship = null;
                      Severity: Major
                      Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php and 2 other locations - About 7 hrs to fix
                      Web.Admin/2014/wordpress/wp-includes/class-simplepie.php on lines 4971..4996
                      Web.Admin/2014/wordpress/wp-includes/class-simplepie.php on lines 5390..5419

                      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 244.

                      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