CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

Method inline_edit has 298 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function inline_edit() {
        global $mode;

        $screen = $this->screen;

    Function wp_get_sidebars_widgets has a Cognitive Complexity of 75 (exceeds 5 allowed). Consider refactoring.
    Open

    function wp_get_sidebars_widgets($deprecated = true) {
        global $wp_registered_widgets, $wp_registered_sidebars, $_wp_sidebars_widgets;
    
        // If loading from front page, consult $_wp_sidebars_widgets rather than options
        // to see if wp_convert_widget_settings() has made manipulations in memory.
    Severity: Minor
    Found in Web.Admin/2014/wordpress/wp-includes/widgets.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 save has a Cognitive Complexity of 75 (exceeds 5 allowed). Consider refactoring.
    Open

        function save($data)
        {
            if ($this->mysql)
            {
                $feed_id = "'" . mysql_real_escape_string($this->id) . "'";
    Severity: Minor
    Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.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

    File widgets.php has 657 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    /**
     * API for creating dynamic sidebar without hardcoding functionality into
     * themes. Includes both internal WordPress routines and theme use routines.
     *
    Severity: Major
    Found in Web.Admin/2014/wordpress/wp-includes/widgets.php - About 1 day to fix

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

                  if ($captions = $this->get_item_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'text'))
                  {
                      foreach ($captions as $caption)
                      {
                          $caption_type = null;
      Severity: Major
      Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php and 1 other location - About 1 day to fix
      Web.Admin/2014/wordpress/wp-includes/class-simplepie.php on lines 3842..3873

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

      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

                  elseif ($captions = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'text'))
                  {
                      foreach ($captions as $caption)
                      {
                          $caption_type = null;
      Severity: Major
      Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php and 1 other location - About 1 day to fix
      Web.Admin/2014/wordpress/wp-includes/class-simplepie.php on lines 3810..3873

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

      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

      Element.ClassNames.prototype = {
        initialize: function(element) {
          this.element = $(element);
        },
      
      
      Severity: Major
      Found in Web.Admin/2014/wordpress/wp-includes/js/prototype.js and 1 other location - About 1 day to fix
      Web.Admin/2014/wordpress/wp-includes/js/scriptaculous/prototype.js on lines 4150..4178

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

      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

      Element.ClassNames.prototype = {
        initialize: function(element) {
          this.element = $(element);
        },
      
      
      Web.Admin/2014/wordpress/wp-includes/js/prototype.js on lines 4150..4178

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

      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

      Function mw_newPost has a Cognitive Complexity of 73 (exceeds 5 allowed). Consider refactoring.
      Open

          function mw_newPost($args) {
              $this->escape($args);
      
              $blog_ID     = (int) $args[0]; // we will support this in the near future
              $username  = $args[1];
      Severity: Minor
      Found in Web.Admin/2014/wordpress/xmlrpc.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 wp_link_pages has a Cognitive Complexity of 73 (exceeds 5 allowed). Consider refactoring.
      Open

      function wp_link_pages($args = '') {
          $defaults = array(
              'before' => '<p>' . __('Pages:'), 'after' => '</p>',
              'link_before' => '', 'link_after' => '',
              'next_or_number' => 'number', 'nextpagelink' => __('Next page'),
      Severity: Minor
      Found in Web.Admin/2014/wordpress/wp-includes/post-template.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 fetch_rss has a Cognitive Complexity of 73 (exceeds 5 allowed). Consider refactoring.
      Open

      function fetch_rss ($url) {
          // initialize constants
          init();
      
          if ( !isset($url) ) {
      Severity: Minor
      Found in Web.Admin/2014/wordpress/wp-includes/rss.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 parse_request has a Cognitive Complexity of 73 (exceeds 5 allowed). Consider refactoring.
      Open

          function parse_request($extra_query_vars = '') {
              global $wp_rewrite;
      
              $this->query_vars = array();
              $taxonomy_query_vars = array();
      Severity: Minor
      Found in Web.Admin/2014/wordpress/wp-includes/classes.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

      File wordpress.php has 646 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      <?php
      /**
       * WordPress Importer
       *
       * @package WordPress
      Severity: Major
      Found in Web.Admin/2014/wordpress/wp-admin/import/wordpress.php - About 1 day to fix

        Function get_media_item has a Cognitive Complexity of 72 (exceeds 5 allowed). Consider refactoring.
        Open

        function get_media_item( $attachment_id, $args = null ) {
            global $redir_tab;
        
            if ( ( $attachment_id = intval($attachment_id) ) && $thumb_url = get_attachment_icon_src( $attachment_id ) )
                $thumb_url = $thumb_url[0];
        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

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

                    if ($hashes_iterator = $this->get_item_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'hash'))
                    {
                        foreach ($hashes_iterator as $hash)
                        {
                            $value = null;
        Severity: Major
        Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Item.php and 1 other location - About 1 day to fix
        Web.Admin/2014/wordpress/wp-includes/class-simplepie.php on lines 4087..4128

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

        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

                    if ($hashes_iterator = $this->get_item_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'hash'))
                    {
                        foreach ($hashes_iterator as $hash)
                        {
                            $value = null;
        Severity: Major
        Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php and 1 other location - About 1 day to fix
        Web.Admin/2014/wordpress/wp-includes/SimplePie/Item.php on lines 1388..1429

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

        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 Prototype = {
          Version: '1.6.0',
        
          Browser: {
            IE:     !!(window.attachEvent && !window.opera),
        Web.Admin/2014/wordpress/wp-includes/js/prototype.js on lines 9..34

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

        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 Prototype = {
          Version: '1.6.0',
        
          Browser: {
            IE:     !!(window.attachEvent && !window.opera),
        Severity: Major
        Found in Web.Admin/2014/wordpress/wp-includes/js/prototype.js and 1 other location - About 1 day to fix
        Web.Admin/2014/wordpress/wp-includes/js/scriptaculous/prototype.js on lines 9..34

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

        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

        Function showDialog has 282 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function showDialog(imageList) {
                var win, data = {}, dom = editor.dom, imgElm = editor.selection.getNode();
                var width, height, imageListCtrl, classListCtrl;
        
                function buildValues(listSettingName, dataItemName, defaultItems) {

          File theme.php has 636 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          <?php
          /**
           * Theme, template, and stylesheet functions.
           *
           * @package WordPress
          Severity: Major
          Found in Web.Admin/2014/wordpress/wp-includes/theme.php - About 1 day to fix
            Severity
            Category
            Status
            Source
            Language