CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

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

Language.snippets = [
//Conditional
    { input : 'if', output : 'If $0 Then\n\t\nEnd If' },
    { input : 'ifelse', output : 'If $0 Then\n\t\n\nElse\n\t\nEnd If' },
    { input : 'case', output : 'Select Case $0\n\tCase ?\n\tCase Else\nEnd Select'},
Web.Admin/2014/wordpress/wp-includes/js/codepress/languages/vbscript.js on lines 63..102

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

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

    public function date_w3cdtf($date)
    {
        static $pcre;
        if (!$pcre)
        {
Severity: Major
Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Parse/Date.php and 1 other location - About 2 days to fix
Web.Admin/2014/wordpress/wp-includes/class-simplepie.php on lines 13112..13175

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

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

    function date_w3cdtf($date)
    {
        static $pcre;
        if (!$pcre)
        {
Severity: Major
Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php and 1 other location - About 2 days to fix
Web.Admin/2014/wordpress/wp-includes/SimplePie/Parse/Date.php on lines 638..701

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

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

File blogger.php has 854 lines of code (exceeds 250 allowed). Consider refactoring.
Open

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

    Function privDeleteByRule has a Cognitive Complexity of 102 (exceeds 5 allowed). Consider refactoring.
    Open

      function privDeleteByRule(&$p_result_list, &$p_options)
      {
        $v_result=1;
        $v_list_detail = array();
    
    
    Severity: Minor
    Found in Web.Admin/2014/wordpress/wp-admin/includes/class-pclzip.php - About 2 days 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

    SimplePie has 106 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class SimplePie
    {
        /**
         * @var array Raw data
         * @access private
    Severity: Major
    Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 2 days to fix

      File IRI.php has 843 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      <?php
      /**
       * SimplePie
       *
       * A PHP-Based RSS and Atom Feed Framework.
      Severity: Major
      Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/IRI.php - About 2 days to fix

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

                if (!in_array($type, array_merge($types_flash, $types_fmedia, $types_quicktime, $types_wmedia, $types_mp3)))
                {
                    switch (strtolower($this->get_extension()))
                    {
                        // Audio mime-types
        Severity: Major
        Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php and 1 other location - About 2 days to fix
        Web.Admin/2014/wordpress/wp-includes/SimplePie/Enclosure.php on lines 1224..1345

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

        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 (!in_array($type, array_merge($types_flash, $types_fmedia, $types_quicktime, $types_wmedia, $types_mp3)))
                {
                    switch (strtolower($this->get_extension()))
                    {
                        // Audio mime-types
        Severity: Major
        Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Enclosure.php and 1 other location - About 2 days to fix
        Web.Admin/2014/wordpress/wp-includes/class-simplepie.php on lines 7188..7309

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

        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

            function walk( $elements, $max_depth) {
        
                $args = array_slice(func_get_args(), 2);
                $output = '';
        
        
        Severity: Major
        Found in Web.Admin/2014/wordpress/wp-includes/classes.php and 1 other location - About 2 days to fix
        Web.Admin/2014/wordpress/wp-includes/class-wp-walker.php on lines 181..252

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

        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

            function walk( $elements, $max_depth) {
        
                $args = array_slice(func_get_args(), 2);
                $output = '';
        
        
        Severity: Major
        Found in Web.Admin/2014/wordpress/wp-includes/class-wp-walker.php and 1 other location - About 2 days to fix
        Web.Admin/2014/wordpress/wp-includes/classes.php on lines 886..957

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

        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 dw_Event = {
          
            add: function(obj, etype, fp, cap) {
                cap = cap || false;
                if (obj.addEventListener) obj.addEventListener(etype, fp, cap);
        Severity: Major
        Found in Web.Admin/2015/js/dw_event.js and 1 other location - About 2 days to fix
        Web.Admin/2014/js/dw_event.js on lines 4..32

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

        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 dw_Event = {
          
            add: function(obj, etype, fp, cap) {
                cap = cap || false;
                if (obj.addEventListener) obj.addEventListener(etype, fp, cap);
        Severity: Major
        Found in Web.Admin/2014/js/dw_event.js and 1 other location - About 2 days to fix
        Web.Admin/2015/js/dw_event.js on lines 4..32

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

        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 100 (exceeds 5 allowed). Consider refactoring.
        Open

            function mw_newPost($args) {
                $this->escape($args);
        
                $blog_ID     = (int) $args[0];
                $username  = $args[1];
        Severity: Minor
        Found in Web.Admin/2014/wordpress/wp-includes/class-wp-xmlrpc-server.php - About 2 days 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 Utils has 401 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            Utils = (function() {
        
                return {
        
                    // legacy support for clearTimer
        Severity: Major
        Found in Web.Admin/2015/js/galleria/galleria-1.4.2.js - About 2 days to fix

          Function Utils has 401 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              Utils = (function() {
          
                  return {
          
                      // legacy support for clearTimer
          Severity: Major
          Found in Web.Admin/Content/galleria/galleria-1.4.2.js - About 2 days to fix

            File class-wp-posts-list-table.php has 833 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            <?php
            /**
             * Posts List Table class.
             *
             * @package WordPress

              File livejournal.php has 830 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

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

                Function privParseOptions has a Cognitive Complexity of 99 (exceeds 5 allowed). Consider refactoring.
                Open

                  function privParseOptions(&$p_options_list, $p_size, &$v_result_list, $v_requested_options=false)
                  {
                    $v_result=1;
                
                    // ----- Read the options
                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 wp_mail has a Cognitive Complexity of 99 (exceeds 5 allowed). Consider refactoring.
                Open

                function wp_mail( $to, $subject, $message, $headers = '', $attachments = array() ) {
                    // Compact the input, apply the filters, and extract them back out
                    extract( apply_filters( 'wp_mail', compact( 'to', 'subject', 'message', 'headers', 'attachments' ) ) );
                
                    if ( !is_array($attachments) )
                Severity: Minor
                Found in Web.Admin/2014/wordpress/wp-includes/pluggable.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

                Severity
                Category
                Status
                Source
                Language