CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

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

    public static function iconv_fallback_utf16be_iso88591($string) {
        if (substr($string, 0, 2) == "\xFE\xFF") {
            // strip BOM
            $string = substr($string, 2);
        }
Severity: Major
Found in Web.Admin/2014/wordpress/wp-includes/ID3/getid3.lib.php and 1 other location - About 2 hrs to fix
Web.Admin/2014/wordpress/wp-includes/ID3/getid3.lib.php on lines 905..916

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

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 parse()
    {
        while ($this->state && $this->state !== 'emit' && $this->has_data())
        {
            $state = $this->state;
Severity: Major
Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php and 1 other location - About 2 hrs to fix
Web.Admin/2014/wordpress/wp-includes/SimplePie/HTTP/Parser.php on lines 147..168

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

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

                                case 1:
                                    $PictureSizeEnc['x'] = getid3_lib::BigEndian2Int(substr($FLVvideoHeader, 4, 3));
                                    $PictureSizeEnc['y'] = getid3_lib::BigEndian2Int(substr($FLVvideoHeader, 6, 3));
                                    $PictureSizeEnc['x'] >>= 7;
                                    $PictureSizeEnc['y'] >>= 7;
Web.Admin/2014/wordpress/wp-includes/ID3/module.audio-video.flv.php on lines 180..194

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

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 user-edit.php has 278 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
/**
 * Edit user administration panel.
 *
 * @package WordPress
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/user-edit.php - About 2 hrs to fix

    Consider simplifying this complex logical expression.
    Open

    if ((window.XMLHttpRequest && !window.FormData) || (window.FileAPI && FileAPI.forceLoad)) {
        var initializeUploadListener = function(xhr) {
            if (!xhr.__listeners) {
                if (!xhr.upload) xhr.upload = {};
                xhr.__listeners = [];
    Severity: Critical
    Found in Web.Admin/z-scripts/ng-file-upload-all.js - About 2 hrs to fix

      Consider simplifying this complex logical expression.
      Open

      if ((window.XMLHttpRequest && !window.FormData) || (window.FileAPI && FileAPI.forceLoad)) {
          var initializeUploadListener = function(xhr) {
              if (!xhr.__listeners) {
                  if (!xhr.upload) xhr.upload = {};
                  xhr.__listeners = [];
      Severity: Critical
      Found in Web.Admin/z-scripts/ng-file-upload-shim.js - About 2 hrs to fix

        InPlaceEditor has 24 functions (exceeds 20 allowed). Consider refactoring.
        Open

        Ajax.InPlaceEditor = Class.create({
          initialize: function(element, url, options) {
            this.url = url;
            this.element = element = $(element);
            this.prepareOptions();
        Severity: Minor
        Found in Web.Admin/2014/wordpress/wp-includes/js/scriptaculous/controls.js - About 2 hrs to fix

          WP_Screen has 24 functions (exceeds 20 allowed). Consider refactoring.
          Open

          final class WP_Screen {
              /**
               * Any action associated with the screen. 'add' for *-add.php and *-new.php screens. Empty otherwise.
               *
               * @since 3.3.0
          Severity: Minor
          Found in Web.Admin/2014/wordpress/wp-admin/includes/screen.php - About 2 hrs to fix

            SimplePie_IRI has 24 functions (exceeds 20 allowed). Consider refactoring.
            Open

            class SimplePie_IRI
            {
                /**
                 * Scheme
                 *
            Severity: Minor
            Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 2 hrs to fix

              Class ContingentController has 24 methods (exceeds 20 allowed). Consider refactoring.
              Open

                  public class ContingentController : Controller
                  {
                      public ActionResult Index()
                      {
                          return View();
              Severity: Minor
              Found in Web.Admin/Controllers/ContingentController.cs - About 2 hrs to fix

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

                if (!Node.ELEMENT_NODE) {
                  // DOM level 2 ECMAScript Language Binding
                  Object.extend(Node, {
                    ELEMENT_NODE: 1,
                    ATTRIBUTE_NODE: 2,
                Severity: Major
                Found in Web.Admin/2014/wordpress/wp-includes/js/prototype.js and 1 other location - About 2 hrs to fix
                Web.Admin/2014/wordpress/wp-includes/js/scriptaculous/prototype.js on lines 1536..1552

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

                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 (!Node.ELEMENT_NODE) {
                  // DOM level 2 ECMAScript Language Binding
                  Object.extend(Node, {
                    ELEMENT_NODE: 1,
                    ATTRIBUTE_NODE: 2,
                Web.Admin/2014/wordpress/wp-includes/js/prototype.js on lines 1536..1552

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

                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

                        deactivate: function() {
                            // Stop watching for uploaded attachments.
                            this.get('library').unobserve( wp.Uploader.queue );
                
                            this.frame.off( 'content:render:browse', this.gallerySettings, this );
                Severity: Major
                Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js and 1 other location - About 2 hrs to fix
                Web.Admin/2014/wordpress/wp-includes/js/media-views.js on lines 983..990

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

                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

                        deactivate: function() {
                            // Stop watching for uploaded attachments.
                            this.get('library').unobserve( wp.Uploader.queue );
                
                            this.frame.off( 'content:render:browse', this.renderSettings, this );
                Severity: Major
                Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js and 1 other location - About 2 hrs to fix
                Web.Admin/2014/wordpress/wp-includes/js/media-views.js on lines 831..838

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

                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

                            AppInsights.prototype.clearAuthenticatedUserContext = function () {
                                try {
                                    this.context.user.clearAuthenticatedUserContext();
                                }
                                catch (e) {
                Severity: Major
                Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js and 1 other location - About 2 hrs to fix
                Web.Admin/z-scripts/ai.0.15.0-build46802.js on lines 2298..2305

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

                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

                            AppInsights.prototype.flush = function () {
                                try {
                                    this.context._sender.triggerSend();
                                }
                                catch (e) {
                Severity: Major
                Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js and 1 other location - About 2 hrs to fix
                Web.Admin/z-scripts/ai.0.15.0-build46802.js on lines 2314..2321

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

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

                <?php
                /**
                 * $Horde: framework/Text_Diff/Diff/Engine/native.php,v 1.10 2008/01/04 10:27:53 jan Exp $
                 *
                 * Class used internally by Text_Diff to actually compute the diffs. This
                Severity: Minor
                Found in Web.Admin/2014/wordpress/wp-includes/Text/Diff/Engine/native.php - About 2 hrs to fix

                  Function _getFormData has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                              _getFormData: function (options, data, fn){
                                  var
                                        file = data.file
                                      , name = data.name
                                      , filename = file.name
                  Severity: Major
                  Found in Web.Admin/z-scripts/FileAPI.js - About 2 hrs to fix

                    Function ngfFixIE has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        FileAPI.ngfFixIE = function(elem, createFileElemFn, bindAttr, changeFn, resetModel) {
                            if (!hasFlash()) {
                                throw 'Adode Flash Player need to be installed. To check ahead use "FileAPI.hasFlash"';
                            }
                            var makeFlashInput = function(evt) {
                    Severity: Major
                    Found in Web.Admin/z-scripts/ng-file-upload-all.js - About 2 hrs to fix

                      Function ngfFixIE has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          FileAPI.ngfFixIE = function(elem, createFileElemFn, bindAttr, changeFn, resetModel) {
                              if (!hasFlash()) {
                                  throw 'Adode Flash Player need to be installed. To check ahead use "FileAPI.hasFlash"';
                              }
                              var makeFlashInput = function(evt) {
                      Severity: Major
                      Found in Web.Admin/z-scripts/ng-file-upload-shim.js - About 2 hrs to fix
                        Severity
                        Category
                        Status
                        Source
                        Language