CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

File custom-background.php has 293 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
/**
 * The custom background script.
 *
 * @package WordPress
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/custom-background.php - About 3 hrs to fix

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

                if ($this->flags & 2)
                {
                    // Check the length of the string is still valid
                    $this->min_compressed_size += $len + 2;
                    if ($this->compressed_size >= $this->min_compressed_size)
    Severity: Major
    Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php and 1 other location - About 3 hrs to fix
    Web.Admin/2014/wordpress/wp-includes/SimplePie/gzdecode.php on lines 312..335

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

    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 ($this->flags & 2)
                {
                    // Check the length of the string is still valid
                    $this->min_compressed_size += $len + 2;
                    if ($this->compressed_size >= $this->min_compressed_size)
    Severity: Major
    Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/gzdecode.php and 1 other location - About 3 hrs to fix
    Web.Admin/2014/wordpress/wp-includes/class-simplepie.php on lines 8541..8564

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

    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 _deprecated_function($function, $version, $replacement=null) {
    
        do_action('deprecated_function_run', $function, $replacement);
    
        // Allow plugin to filter the output error trigger
    Severity: Major
    Found in Web.Admin/2014/wordpress/wp-includes/functions.php and 1 other location - About 3 hrs to fix
    Web.Admin/2014/wordpress/wp-includes/functions.php on lines 2999..3010

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

    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 _deprecated_file($file, $version, $replacement=null) {
    
        do_action('deprecated_file_included', $file, $replacement);
    
        // Allow plugin to filter the output error trigger
    Severity: Major
    Found in Web.Admin/2014/wordpress/wp-includes/functions.php and 1 other location - About 3 hrs to fix
    Web.Admin/2014/wordpress/wp-includes/functions.php on lines 2963..2974

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

    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 sendHttp has 75 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function sendHttp(config) {
            config.method = config.method || 'POST';
            config.headers = config.headers || {};
            config.transformRequest = config.transformRequest || function (data, headersGetter) {
                if (window.ArrayBuffer && data instanceof window.ArrayBuffer) {
    Severity: Major
    Found in Web.Admin/z-scripts/ng-file-upload.js - About 3 hrs to fix

      Function sendHttp has 75 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function sendHttp(config) {
              config.method = config.method || 'POST';
              config.headers = config.headers || {};
              config.transformRequest = config.transformRequest || function (data, headersGetter) {
                  if (window.ArrayBuffer && data instanceof window.ArrayBuffer) {
      Severity: Major
      Found in Web.Admin/z-scripts/ng-file-upload-all.js - About 3 hrs to fix

        Function init has 75 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                init : function(ed, url) {
                    var t = this;
        
                    t.url = url;
                    t._createButtons();

          Method privCalculateStoredFilename has 75 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            function privCalculateStoredFilename(&$p_filedescr, &$p_options)
            {
              $v_result=1;
          
              // ----- Working variables
          Severity: Major
          Found in Web.Admin/2014/wordpress/wp-admin/includes/class-pclzip.php - About 3 hrs to fix

            Method prepare_items has 75 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function prepare_items() {
                    global $s, $mode, $wpdb;
            
                    $current_site = get_current_site();
            
            

              Method display_rows has 75 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function display_rows() {
                      global $cat_id;
              
                      $alt = 0;
              
              

                Method auto_check_comment has 75 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public static function auto_check_comment( $commentdata ) {
                        self::$last_comment_result = null;
                
                        $comment = $commentdata;
                
                
                Severity: Major
                Found in Web.Admin/2014/wordpress/wp-content/plugins/akismet/class.akismet.php - About 3 hrs to fix

                  Method sanitize_option has 75 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function sanitize_option($option, $value) {
                  
                      switch ($option) {
                          case 'admin_email':
                              $value = sanitize_email($value);
                  Severity: Major
                  Found in Web.Admin/2014/wordpress/wp-includes/formatting.php - About 3 hrs to fix

                    Consider simplifying this complex logical expression.
                    Open

                                            if (($c == $strlen_chrs) || (($chrs{$c} == ',') && ($top['what'] == SERVICES_JSON_SLICE))) {
                                                // found a comma that is not inside a string, array, etc.,
                                                // OR we've reached the end of the character list
                                                $slice = substr($chrs, $top['where'], ($c - $top['where']));
                                                array_push($stk, array('what' => SERVICES_JSON_SLICE, 'where' => ($c + 1), 'delim' => false));
                    Severity: Critical
                    Found in Web.Admin/2014/wordpress/wp-includes/class-json.php - About 3 hrs to fix

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

                                  if ($scope.model.year === 2014) {
                                      $scope.model.participant.Package.ManitobaDinner = isCompletePackage;
                                      $scope.model.participant.Package.ManitobaDance = isCompletePackage;
                                      $scope.model.participant.Package.FinalBanquet = isCompletePackage;
                                      $scope.model.participant.Package.Transportation = isCompletePackage;
                      Web.Admin/AdminApp/Controllers/controller.modal.participant.js on lines 41..46

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

                      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

                      {if(typeof(opt)!='object')opt={};options=$.extend(options,opt);if(typeof(options.onChange)!=='function')
                      options.onChange=function(){};if(typeof(options.onSelect)!=='function')
                      options.onSelect=function(){};};function tellSelect()
                      Web.Admin/2014/wordpress/wp-includes/js/jcrop/jquery.Jcrop.dev.js on lines 1041..1051

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

                      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

                                  } else {
                                      $scope.model.participant.Package.Option1 = isCompletePackage;
                                      $scope.model.participant.Package.Option2 = isCompletePackage;
                                      $scope.model.participant.Package.Option3 = isCompletePackage;
                                      $scope.model.participant.Package.Option4 = isCompletePackage;
                      Web.Admin/AdminApp/Controllers/controller.modal.participant.js on lines 36..41

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

                      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

                                  frame = wp.media.frames.customBackground = wp.media({
                                      // Set the title of the modal.
                                      title: $el.data('choose'),
                      
                                      // Tell the modal to show only images.
                      Severity: Major
                      Found in Web.Admin/2014/wordpress/wp-admin/js/custom-background.js and 1 other location - About 3 hrs to fix
                      Web.Admin/2014/wordpress/wp-admin/js/custom-header.js on lines 29..46

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

                      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

                          {
                              if (typeof(opt) != 'object') opt = { };
                              options = $.extend(options,opt);
                      
                              if (typeof(options.onChange)!=='function')
                      Web.Admin/2014/wordpress/wp-includes/js/jcrop/jquery.Jcrop.js on lines 144..146

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

                      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

                                  frame = wp.media.frames.customHeader = wp.media({
                                      // Set the title of the modal.
                                      title: $el.data('choose'),
                      
                                      // Tell the modal to show only images.
                      Severity: Major
                      Found in Web.Admin/2014/wordpress/wp-admin/js/custom-header.js and 1 other location - About 3 hrs to fix
                      Web.Admin/2014/wordpress/wp-admin/js/custom-background.js on lines 36..53

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

                      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