CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

File wp-fullscreen.js has 493 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/* global deleteUserSetting, setUserSetting, switchEditors, tinymce, tinyMCEPreInit */
/**
 * Distraction Free Writing
 * (wp-fullscreen)
 *
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/js/wp-fullscreen.js - About 7 hrs to fix

    File Entities.php has 493 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    /**
     * SimplePie
     *
     * A PHP-Based RSS and Atom Feed Framework.

      File press-this.php has 492 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      <?php
      /**
       * Press This Display and Handler.
       *
       * @package WordPress
      Severity: Minor
      Found in Web.Admin/2014/wordpress/wp-admin/press-this.php - About 7 hrs to fix

        Function Finger has 195 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        Galleria.Finger = (function() {
        
            var abs = M.abs;
        
            // test for translate3d support
        Severity: Major
        Found in Web.Admin/2015/js/galleria/galleria-1.4.2.js - About 7 hrs to fix

          Function Finger has 195 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          Galleria.Finger = (function() {
          
              var abs = M.abs;
          
              // test for translate3d support
          Severity: Major
          Found in Web.Admin/Content/galleria/galleria-1.4.2.js - About 7 hrs to fix

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

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

              Function suggest has 194 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  $.suggest = function(input, options) {
                      var $input, $results, timeout, prevLength, cache, cacheSize;
              
                      $input = $(input).attr("autocomplete", "off");
                      $results = $(document.createElement("ul"));
              Severity: Major
              Found in Web.Admin/2014/wordpress/wp-includes/js/jquery/suggest.dev.js - About 7 hrs to fix

                Method get_terms has 194 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function &get_terms($taxonomies, $args = '') {
                    global $wpdb;
                    $empty_array = array();
                
                    $single_taxonomy = false;
                Severity: Major
                Found in Web.Admin/2014/wordpress/wp-includes/taxonomy.php - About 7 hrs to fix

                  Method EBMLidName has 194 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      private static function EBMLidName($value) {
                          static $EBMLidList = array();
                          if (empty($EBMLidList)) {
                              $EBMLidList[EBML_ID_ASPECTRATIOTYPE]            = 'AspectRatioType';
                              $EBMLidList[EBML_ID_ATTACHEDFILE]               = 'AttachedFile';

                    Function convert_categories has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring.
                    Open

                        function convert_categories() {
                            global $wpdb;
                    
                            if ( (!isset($_POST['cats_to_convert']) || !is_array($_POST['cats_to_convert'])) && empty($this->categories_to_convert)) { ?>
                                <div class="narrow">
                    Severity: Minor
                    Found in Web.Admin/2014/wordpress/wp-admin/import/wp-cat2tag.php - About 7 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 ParseVorbisComments has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring.
                    Open

                        public function ParseVorbisComments() {
                            $info = &$this->getid3->info;
                    
                            $OriginalOffset = $this->ftell();
                            $commentdataoffset = 0;
                    Severity: Minor
                    Found in Web.Admin/2014/wordpress/wp-includes/ID3/module.audio.ogg.php - About 7 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 remove_iunreserved_percent_encoded has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring.
                    Open

                        protected function remove_iunreserved_percent_encoded($match)
                        {
                            // As we just have valid percent encoded sequences we can just explode
                            // and ignore the first member of the returned array (an empty string).
                            $bytes = explode('%', $match[0]);
                    Severity: Minor
                    Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/IRI.php - About 7 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 __construct has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring.
                    Open

                        public function __construct( $theme_dir, $theme_root, $_child = null ) {
                            global $wp_theme_directories;
                    
                            // Initialize caching on first run.
                            if ( ! isset( self::$persistently_cache ) ) {
                    Severity: Minor
                    Found in Web.Admin/2014/wordpress/wp-includes/class-wp-theme.php - About 7 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

                    Abstract.TimedObserver = Class.create(PeriodicalExecuter, {
                      initialize: function($super, element, frequency, callback) {
                        $super(callback, frequency);
                        this.element   = $(element);
                        this.lastValue = this.getValue();
                    Severity: Major
                    Found in Web.Admin/2014/wordpress/wp-includes/js/prototype.js and 1 other location - About 7 hrs to fix
                    Web.Admin/2014/wordpress/wp-includes/js/scriptaculous/prototype.js on lines 3601..3616

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

                    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 dw_getElementsByClassName(sClass, sTag, oCont) {
                        var result = [], list, i;
                        var re = new RegExp("\\b" + sClass + "\\b", "i");
                        oCont = oCont? oCont: document;
                        if ( document.getElementsByTagName ) {
                    Severity: Major
                    Found in Web.Admin/2014/js/dw_rotator_aux.js and 1 other location - About 7 hrs to fix
                    Web.Admin/2015/js/dw_rotator_aux.js on lines 87..101

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

                    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 dw_getElementsByClassName(sClass, sTag, oCont) {
                        var result = [], list, i;
                        var re = new RegExp("\\b" + sClass + "\\b", "i");
                        oCont = oCont? oCont: document;
                        if ( document.getElementsByTagName ) {
                    Severity: Major
                    Found in Web.Admin/2015/js/dw_rotator_aux.js and 1 other location - About 7 hrs to fix
                    Web.Admin/2014/js/dw_rotator_aux.js on lines 87..101

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

                    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

                    Abstract.TimedObserver = Class.create(PeriodicalExecuter, {
                      initialize: function($super, element, frequency, callback) {
                        $super(callback, frequency);
                        this.element   = $(element);
                        this.lastValue = this.getValue();
                    Web.Admin/2014/wordpress/wp-includes/js/prototype.js on lines 3601..3616

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

                    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 continents-cities.php has 488 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    <?php
                    
                    /* Continent and city translations for timezone selection.
                     * This file is not included anywhere. It exists solely for use by xgettext.
                     */
                    Severity: Minor
                    Found in Web.Admin/2014/wordpress/wp-admin/includes/continents-cities.php - About 7 hrs to fix

                      Method Handle has 192 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              public IEnumerable Handle(Func<Guid, MatchAggregate> al, SaveMatchResult command)
                              {
                                  var agg = al(command.Id);
                                  
                                  var match = _dispatcher.Load<MatchAggregate>(command.Id); //TODO: Why am I loading this again?
                      Severity: Major
                      Found in Aggregates/Scores/ScoresCommandHandlers.cs - About 7 hrs to fix

                        File post.dev.js has 485 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        var tagBox, commentsBox, editPermalink, makeSlugeditClickable, WPSetThumbnailHTML, WPSetThumbnailID, WPRemoveThumbnail;
                        
                        // return an array with any duplicate, whitespace or values removed
                        function array_unique_noempty(a) {
                            var out = [];
                        Severity: Minor
                        Found in Web.Admin/2014/wordpress/wp-admin/js/post.dev.js - About 7 hrs to fix
                          Severity
                          Category
                          Status
                          Source
                          Language