WordPress/WordPress

View on GitHub
wp-includes/js/mediaelement/mediaelement.js

Summary

Maintainability
F
11 mos
Test Coverage

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

},{}],5:[function(_dereq_,module,exports){
'use strict';

Object.defineProperty(exports, "__esModule", {
    value: true
Severity: Minor
Found in wp-includes/js/mediaelement/mediaelement.js - About 3 wks 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 mediaelement.js has 3230 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*!
 * MediaElement.js
 * http://www.mediaelementjs.com/
 *
 * Wrapper that mimics native HTML5 MediaElement (audio and video)
Severity: Major
Found in wp-includes/js/mediaelement/mediaelement.js - About 1 wk to fix

    Function 6 has a Cognitive Complexity of 215 (exceeds 5 allowed). Consider refactoring.
    Open

    },{"18":18,"7":7,"9":9}],6:[function(_dereq_,module,exports){
    'use strict';
    
    Object.defineProperty(exports, "__esModule", {
        value: true
    Severity: Minor
    Found in wp-includes/js/mediaelement/mediaelement.js - About 4 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 15 has a Cognitive Complexity of 118 (exceeds 5 allowed). Consider refactoring.
    Open

    },{"16":16,"18":18,"2":2,"3":3,"7":7,"8":8}],15:[function(_dereq_,module,exports){
    'use strict';
    
    var _window = _dereq_(3);
    
    
    Severity: Minor
    Found in wp-includes/js/mediaelement/mediaelement.js - 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 15 has 450 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    },{"16":16,"18":18,"2":2,"3":3,"7":7,"8":8}],15:[function(_dereq_,module,exports){
    'use strict';
    
    var _window = _dereq_(3);
    
    
    Severity: Major
    Found in wp-includes/js/mediaelement/mediaelement.js - About 2 days to fix

      Function 11 has a Cognitive Complexity of 107 (exceeds 5 allowed). Consider refactoring.
      Open

      },{"16":16,"17":17,"18":18,"19":19,"3":3,"7":7,"8":8}],11:[function(_dereq_,module,exports){
      'use strict';
      
      Object.defineProperty(exports, "__esModule", {
          value: true
      Severity: Minor
      Found in wp-includes/js/mediaelement/mediaelement.js - 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 6 has 366 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      },{"18":18,"7":7,"9":9}],6:[function(_dereq_,module,exports){
      'use strict';
      
      Object.defineProperty(exports, "__esModule", {
          value: true
      Severity: Major
      Found in wp-includes/js/mediaelement/mediaelement.js - About 1 day to fix

        Function 11 has 347 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        },{"16":16,"17":17,"18":18,"19":19,"3":3,"7":7,"8":8}],11:[function(_dereq_,module,exports){
        'use strict';
        
        Object.defineProperty(exports, "__esModule", {
            value: true
        Severity: Major
        Found in wp-includes/js/mediaelement/mediaelement.js - About 1 day to fix

          Function MediaElement has 345 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          var MediaElement = function MediaElement(idOrNode, options, sources) {
              var _this = this;
          
              _classCallCheck(this, MediaElement);
          
          
          Severity: Major
          Found in wp-includes/js/mediaelement/mediaelement.js - About 1 day to fix

            Function 17 has a Cognitive Complexity of 84 (exceeds 5 allowed). Consider refactoring.
            Open

            },{"2":2,"3":3,"7":7}],17:[function(_dereq_,module,exports){
            'use strict';
            
            Object.defineProperty(exports, "__esModule", {
                value: true
            Severity: Minor
            Found in wp-includes/js/mediaelement/mediaelement.js - 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 create has 328 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                create: function create(mediaElement, options, mediaFiles) {
            
                    var youtube = {},
                        apiStack = [],
                        readyState = 4;
            Severity: Major
            Found in wp-includes/js/mediaelement/mediaelement.js - About 1 day to fix

              Function 8 has a Cognitive Complexity of 68 (exceeds 5 allowed). Consider refactoring.
              Open

              },{"3":3}],8:[function(_dereq_,module,exports){
              'use strict';
              
              Object.defineProperty(exports, "__esModule", {
                  value: true
              Severity: Minor
              Found in wp-includes/js/mediaelement/mediaelement.js - 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 4 has a Cognitive Complexity of 63 (exceeds 5 allowed). Consider refactoring.
              Open

              },{}],4:[function(_dereq_,module,exports){
              (function (root) {
              
                // Store setTimeout reference so promise-polyfill will be unaffected by
                // other code modifying setTimeout (like sinon.useFakeTimers())
              Severity: Minor
              Found in wp-includes/js/mediaelement/mediaelement.js - 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 13 has 236 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              },{"16":16,"17":17,"18":18,"19":19,"3":3,"7":7,"8":8}],13:[function(_dereq_,module,exports){
              'use strict';
              
              var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
              
              
              Severity: Major
              Found in wp-includes/js/mediaelement/mediaelement.js - About 1 day to fix

                Function 5 has 231 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                },{}],5:[function(_dereq_,module,exports){
                'use strict';
                
                Object.defineProperty(exports, "__esModule", {
                    value: true
                Severity: Major
                Found in wp-includes/js/mediaelement/mediaelement.js - About 1 day to fix

                  Function 12 has 196 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  },{"16":16,"18":18,"19":19,"2":2,"3":3,"5":5,"7":7,"8":8}],12:[function(_dereq_,module,exports){
                  'use strict';
                  
                  var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
                  
                  
                  Severity: Major
                  Found in wp-includes/js/mediaelement/mediaelement.js - About 7 hrs to fix

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

                    },{}],10:[function(_dereq_,module,exports){
                    'use strict';
                    
                    var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
                    
                    
                    Severity: Major
                    Found in wp-includes/js/mediaelement/mediaelement.js - About 7 hrs to fix

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

                      },{"2":2,"3":3,"7":7}],17:[function(_dereq_,module,exports){
                      'use strict';
                      
                      Object.defineProperty(exports, "__esModule", {
                          value: true
                      Severity: Major
                      Found in wp-includes/js/mediaelement/mediaelement.js - About 7 hrs to fix

                        Function t has 193 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        i18n.t = function (message) {
                            var pluralParam = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
                        
                        
                            if (typeof message === 'string' && message.length) {
                        Severity: Major
                        Found in wp-includes/js/mediaelement/mediaelement.js - About 7 hrs to fix

                          Function create has 193 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              create: function create(mediaElement, options, mediaFiles) {
                          
                                  var flash = {};
                                  var isActive = false;
                          
                          
                          Severity: Major
                          Found in wp-includes/js/mediaelement/mediaelement.js - About 7 hrs to fix

                            Function 20 has a Cognitive Complexity of 48 (exceeds 5 allowed). Consider refactoring.
                            Open

                            },{"18":18,"7":7}],20:[function(_dereq_,module,exports){
                            'use strict';
                            
                            var _document = _dereq_(2);
                            
                            
                            Severity: Minor
                            Found in wp-includes/js/mediaelement/mediaelement.js - 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 4 has 183 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            },{}],4:[function(_dereq_,module,exports){
                            (function (root) {
                            
                              // Store setTimeout reference so promise-polyfill will be unaffected by
                              // other code modifying setTimeout (like sinon.useFakeTimers())
                            Severity: Major
                            Found in wp-includes/js/mediaelement/mediaelement.js - About 7 hrs to fix

                              Function create has 181 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  create: function create(mediaElement, options, mediaFiles) {
                              
                                      var originalNode = mediaElement.originalNode,
                                          id = mediaElement.id + '_' + options.prefix,
                                          preload = originalNode.getAttribute('preload'),
                              Severity: Major
                              Found in wp-includes/js/mediaelement/mediaelement.js - About 7 hrs to fix

                                Function _plural has 165 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                        var _plural = function _plural(input, number, form) {
                                
                                            if ((typeof input === 'undefined' ? 'undefined' : _typeof(input)) !== 'object' || typeof number !== 'number' || typeof form !== 'number') {
                                                return input;
                                            }
                                Severity: Major
                                Found in wp-includes/js/mediaelement/mediaelement.js - About 6 hrs to fix

                                  Function _pluralForms has 159 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                              var _pluralForms = function () {
                                                  return [function () {
                                                      return arguments.length <= 1 ? undefined : arguments[1];
                                                  }, function () {
                                                      return (arguments.length <= 0 ? undefined : arguments[0]) === 1 ? arguments.length <= 1 ? undefined : arguments[1] : arguments.length <= 2 ? undefined : arguments[2];
                                  Severity: Major
                                  Found in wp-includes/js/mediaelement/mediaelement.js - About 6 hrs to fix

                                    Function 16 has 154 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    },{"17":17,"18":18,"19":19,"2":2,"3":3,"7":7,"8":8}],16:[function(_dereq_,module,exports){
                                    'use strict';
                                    
                                    Object.defineProperty(exports, "__esModule", {
                                        value: true
                                    Severity: Major
                                    Found in wp-includes/js/mediaelement/mediaelement.js - About 6 hrs to fix

                                      Function create has 139 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          create: function create(mediaElement, options, mediaFiles) {
                                      
                                              var originalNode = mediaElement.originalNode,
                                                  id = mediaElement.id + '_' + options.prefix;
                                      
                                      
                                      Severity: Major
                                      Found in wp-includes/js/mediaelement/mediaelement.js - About 5 hrs to fix

                                        Function create has 139 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            create: function create(mediaElement, options, mediaFiles) {
                                        
                                                var originalNode = mediaElement.originalNode,
                                                    id = mediaElement.id + '_' + options.prefix,
                                                    autoplay = originalNode.autoplay,
                                        Severity: Major
                                        Found in wp-includes/js/mediaelement/mediaelement.js - About 5 hrs to fix

                                          Function 19 has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring.
                                          Open

                                          },{"7":7}],19:[function(_dereq_,module,exports){
                                          'use strict';
                                          
                                          Object.defineProperty(exports, "__esModule", {
                                              value: true
                                          Severity: Minor
                                          Found in wp-includes/js/mediaelement/mediaelement.js - About 5 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 10 has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring.
                                          Open

                                          },{}],10:[function(_dereq_,module,exports){
                                          'use strict';
                                          
                                          var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
                                          
                                          
                                          Severity: Minor
                                          Found in wp-includes/js/mediaelement/mediaelement.js - About 5 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 16 has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
                                          Open

                                          },{"17":17,"18":18,"19":19,"2":2,"3":3,"7":7,"8":8}],16:[function(_dereq_,module,exports){
                                          'use strict';
                                          
                                          Object.defineProperty(exports, "__esModule", {
                                              value: true
                                          Severity: Minor
                                          Found in wp-includes/js/mediaelement/mediaelement.js - About 5 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 20 has 126 lines of code (exceeds 25 allowed). Consider refactoring.
                                          Open

                                          },{"18":18,"7":7}],20:[function(_dereq_,module,exports){
                                          'use strict';
                                          
                                          var _document = _dereq_(2);
                                          
                                          
                                          Severity: Major
                                          Found in wp-includes/js/mediaelement/mediaelement.js - About 5 hrs to fix

                                            Function 13 has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
                                            Open

                                            },{"16":16,"17":17,"18":18,"19":19,"3":3,"7":7,"8":8}],13:[function(_dereq_,module,exports){
                                            'use strict';
                                            
                                            var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
                                            
                                            
                                            Severity: Minor
                                            Found in wp-includes/js/mediaelement/mediaelement.js - About 4 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 12 has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
                                            Open

                                            },{"16":16,"18":18,"19":19,"2":2,"3":3,"5":5,"7":7,"8":8}],12:[function(_dereq_,module,exports){
                                            'use strict';
                                            
                                            var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
                                            
                                            
                                            Severity: Minor
                                            Found in wp-includes/js/mediaelement/mediaelement.js - About 4 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 14 has 108 lines of code (exceeds 25 allowed). Consider refactoring.
                                            Open

                                            },{"16":16,"17":17,"18":18,"19":19,"3":3,"7":7,"8":8}],14:[function(_dereq_,module,exports){
                                            'use strict';
                                            
                                            var _window = _dereq_(3);
                                            
                                            
                                            Severity: Major
                                            Found in wp-includes/js/mediaelement/mediaelement.js - About 4 hrs to fix

                                              Function 14 has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
                                              Open

                                              },{"16":16,"17":17,"18":18,"19":19,"3":3,"7":7,"8":8}],14:[function(_dereq_,module,exports){
                                              'use strict';
                                              
                                              var _window = _dereq_(3);
                                              
                                              
                                              Severity: Minor
                                              Found in wp-includes/js/mediaelement/mediaelement.js - About 4 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 18 has 104 lines of code (exceeds 25 allowed). Consider refactoring.
                                              Open

                                              },{"2":2,"3":3,"7":7}],18:[function(_dereq_,module,exports){
                                              'use strict';
                                              
                                              Object.defineProperty(exports, "__esModule", {
                                                  value: true
                                              Severity: Major
                                              Found in wp-includes/js/mediaelement/mediaelement.js - About 4 hrs to fix

                                                Function assignGettersSetters has 94 lines of code (exceeds 25 allowed). Consider refactoring.
                                                Open

                                                            assignGettersSetters = function assignGettersSetters(propName) {
                                                
                                                            var capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);
                                                
                                                            youtube['get' + capName] = function () {
                                                Severity: Major
                                                Found in wp-includes/js/mediaelement/mediaelement.js - About 3 hrs to fix

                                                  Function 19 has 93 lines of code (exceeds 25 allowed). Consider refactoring.
                                                  Open

                                                  },{"7":7}],19:[function(_dereq_,module,exports){
                                                  'use strict';
                                                  
                                                  Object.defineProperty(exports, "__esModule", {
                                                      value: true
                                                  Severity: Major
                                                  Found in wp-includes/js/mediaelement/mediaelement.js - About 3 hrs to fix

                                                    Function 8 has 88 lines of code (exceeds 25 allowed). Consider refactoring.
                                                    Open

                                                    },{"3":3}],8:[function(_dereq_,module,exports){
                                                    'use strict';
                                                    
                                                    Object.defineProperty(exports, "__esModule", {
                                                        value: true
                                                    Severity: Major
                                                    Found in wp-includes/js/mediaelement/mediaelement.js - About 3 hrs to fix

                                                      Function 9 has 78 lines of code (exceeds 25 allowed). Consider refactoring.
                                                      Open

                                                      },{"7":7}],9:[function(_dereq_,module,exports){
                                                      'use strict';
                                                      
                                                      Object.defineProperty(exports, "__esModule", {
                                                          value: true
                                                      Severity: Major
                                                      Found in wp-includes/js/mediaelement/mediaelement.js - About 3 hrs to fix

                                                        Function create has 78 lines of code (exceeds 25 allowed). Consider refactoring.
                                                        Open

                                                            create: function create(mediaElement, options, mediaFiles) {
                                                        
                                                                var id = mediaElement.id + '_' + options.prefix;
                                                                var isActive = false;
                                                        
                                                        
                                                        Severity: Major
                                                        Found in wp-includes/js/mediaelement/mediaelement.js - About 3 hrs to fix

                                                          Function Renderer has 74 lines of code (exceeds 25 allowed). Consider refactoring.
                                                          Open

                                                          var Renderer = function () {
                                                              function Renderer() {
                                                                  _classCallCheck(this, Renderer);
                                                          
                                                                  this.renderers = {};
                                                          Severity: Major
                                                          Found in wp-includes/js/mediaelement/mediaelement.js - About 2 hrs to fix

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

                                                            },{"2":2,"3":3,"7":7}],18:[function(_dereq_,module,exports){
                                                            'use strict';
                                                            
                                                            Object.defineProperty(exports, "__esModule", {
                                                                value: true
                                                            Severity: Minor
                                                            Found in wp-includes/js/mediaelement/mediaelement.js - About 2 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 2 has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
                                                            Open

                                                            },{}],2:[function(_dereq_,module,exports){
                                                            (function (global){
                                                            var topLevel = typeof global !== 'undefined' ? global :
                                                                typeof window !== 'undefined' ? window : {}
                                                            var minDoc = _dereq_(1);
                                                            Severity: Minor
                                                            Found in wp-includes/js/mediaelement/mediaelement.js - About 2 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 ajax has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                                                            Open

                                                            function ajax(url, dataType, success, error) {
                                                                var xhr = _window2.default.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject('Microsoft.XMLHTTP');
                                                            
                                                                var type = 'application/x-www-form-urlencoded; charset=UTF-8',
                                                                    completed = false,
                                                            Severity: Minor
                                                            Found in wp-includes/js/mediaelement/mediaelement.js - About 1 hr to fix

                                                              Function assignHlsEvents has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                                                              Open

                                                                          var assignHlsEvents = function assignHlsEvents(name, data) {
                                                                              if (name === 'hlsError') {
                                                                                  console.warn(data);
                                                                                  data = data[1];
                                                              
                                                              
                                                              Severity: Minor
                                                              Found in wp-includes/js/mediaelement/mediaelement.js - About 1 hr to fix

                                                                Function changeRenderer has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                Open

                                                                    t.mediaElement.changeRenderer = function (rendererName, mediaFiles) {
                                                                
                                                                        var t = _this,
                                                                            media = Object.keys(mediaFiles[0]).length > 2 ? mediaFiles[0] : mediaFiles[0].src;
                                                                
                                                                
                                                                Severity: Minor
                                                                Found in wp-includes/js/mediaelement/mediaelement.js - About 1 hr to fix

                                                                  Function assignGettersSetters has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                  Open

                                                                              assignGettersSetters = function assignGettersSetters(propName) {
                                                                              flash.flashState[propName] = null;
                                                                  
                                                                              var capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);
                                                                  
                                                                  
                                                                  Severity: Minor
                                                                  Found in wp-includes/js/mediaelement/mediaelement.js - About 1 hr to fix

                                                                    Function onStateChange has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                    Open

                                                                                    onStateChange: function onStateChange(e) {
                                                                                        var events = [];
                                                                    
                                                                                        switch (e.data) {
                                                                                            case -1:
                                                                    Severity: Minor
                                                                    Found in wp-includes/js/mediaelement/mediaelement.js - About 1 hr to fix

                                                                      Function setSrc has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                      Open

                                                                              setSrc = function setSrc(value) {
                                                                              var mediaFiles = [];
                                                                      
                                                                              if (typeof value === 'string') {
                                                                                  mediaFiles.push({
                                                                      Severity: Minor
                                                                      Found in wp-includes/js/mediaelement/mediaelement.js - About 1 hr to fix

                                                                        Function assignGettersSetters has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                        Open

                                                                                    assignGettersSetters = function assignGettersSetters(propName) {
                                                                                    var capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);
                                                                        
                                                                                    node['get' + capName] = function () {
                                                                                        return dashPlayer !== null ? node[propName] : null;
                                                                        Severity: Minor
                                                                        Found in wp-includes/js/mediaelement/mediaelement.js - About 1 hr to fix

                                                                          Function onReady has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                          Open

                                                                                          onReady: function onReady(e) {
                                                                                              mediaElement.youTubeApi = youTubeApi = e.target;
                                                                                              mediaElement.youTubeState = {
                                                                                                  paused: true,
                                                                                                  ended: false
                                                                          Severity: Minor
                                                                          Found in wp-includes/js/mediaelement/mediaelement.js - About 1 hr to fix

                                                                            Consider simplifying this complex logical expression.
                                                                            Open

                                                                            if (!Element.prototype.matches) {
                                                                                Element.prototype.matches = Element.prototype.matchesSelector || Element.prototype.mozMatchesSelector || Element.prototype.msMatchesSelector || Element.prototype.oMatchesSelector || Element.prototype.webkitMatchesSelector || function (s) {
                                                                                    var matches = (this.document || this.ownerDocument).querySelectorAll(s),
                                                                                        i = matches.length - 1;
                                                                                    while (--i >= 0 && matches.item(i) !== this) {}
                                                                            Severity: Critical
                                                                            Found in wp-includes/js/mediaelement/mediaelement.js - About 1 hr to fix

                                                                              Function assignGettersSetters has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                              Open

                                                                                          assignGettersSetters = function assignGettersSetters(propName) {
                                                                                          var capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);
                                                                              
                                                                                          node['get' + capName] = function () {
                                                                                              return flvPlayer !== null ? node[propName] : null;
                                                                              Severity: Minor
                                                                              Found in wp-includes/js/mediaelement/mediaelement.js - About 1 hr to fix

                                                                                Function select has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                Open

                                                                                        value: function select(mediaFiles) {
                                                                                            var renderers = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
                                                                                
                                                                                            var renderersLength = renderers.length;
                                                                                
                                                                                
                                                                                Severity: Minor
                                                                                Found in wp-includes/js/mediaelement/mediaelement.js - About 1 hr to fix

                                                                                  Function 3 has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                                                                                  Open

                                                                                  },{"1":1}],3:[function(_dereq_,module,exports){
                                                                                  (function (global){
                                                                                  var win;
                                                                                  
                                                                                  if (typeof window !== "undefined") {
                                                                                  Severity: Minor
                                                                                  Found in wp-includes/js/mediaelement/mediaelement.js - About 1 hr 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 all has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                  Open

                                                                                    Promise.all = function (arr) {
                                                                                      var args = Array.prototype.slice.call(arr);
                                                                                  
                                                                                      return new Promise(function (resolve, reject) {
                                                                                        if (args.length === 0) return resolve([]);
                                                                                  Severity: Minor
                                                                                  Found in wp-includes/js/mediaelement/mediaelement.js - About 1 hr to fix

                                                                                    Function debounce has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                    Open

                                                                                    function debounce(func, wait) {
                                                                                        var _this = this,
                                                                                            _arguments = arguments;
                                                                                    
                                                                                        var immediate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
                                                                                    Severity: Minor
                                                                                    Found in wp-includes/js/mediaelement/mediaelement.js - About 1 hr to fix

                                                                                      Avoid deeply nested control flow statements.
                                                                                      Open

                                                                                                                      if ((0, _general.isString)(options.dash.robustnessLevel) && options.dash.robustnessLevel) {
                                                                                                                          dashPlayer.getProtectionController().setRobustnessLevel(options.dash.robustnessLevel);
                                                                                                                      }
                                                                                      Severity: Major
                                                                                      Found in wp-includes/js/mediaelement/mediaelement.js - About 45 mins to fix

                                                                                        Avoid deeply nested control flow statements.
                                                                                        Open

                                                                                                                            if (index < total && mediaFiles[index + 1] !== undefined) {
                                                                                                                                node.setSrc(mediaFiles[index++].src);
                                                                                                                                node.load();
                                                                                                                                node.play();
                                                                                                                            } else {
                                                                                        Severity: Major
                                                                                        Found in wp-includes/js/mediaelement/mediaelement.js - About 45 mins to fix

                                                                                          Avoid deeply nested control flow statements.
                                                                                          Open

                                                                                                                                  if (!t.mediaElement.renderer.paused) {
                                                                                                                                      t.mediaElement.renderer.pause();
                                                                                                                                  }
                                                                                          Severity: Major
                                                                                          Found in wp-includes/js/mediaelement/mediaelement.js - About 45 mins to fix

                                                                                            Avoid deeply nested control flow statements.
                                                                                            Open

                                                                                                                if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {
                                                                                                                    to[nextKey] = nextSource[nextKey];
                                                                                                                }
                                                                                            Severity: Major
                                                                                            Found in wp-includes/js/mediaelement/mediaelement.js - About 45 mins to fix

                                                                                              Function addPlugin has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                              Open

                                                                                                  addPlugin: function addPlugin(p, pluginName, mimeType, activeX, axDetect) {
                                                                                              Severity: Minor
                                                                                              Found in wp-includes/js/mediaelement/mediaelement.js - About 35 mins to fix

                                                                                                Avoid too many return statements within this function.
                                                                                                Open

                                                                                                            return 'application/dash+xml';
                                                                                                Severity: Major
                                                                                                Found in wp-includes/js/mediaelement/mediaelement.js - About 30 mins to fix

                                                                                                  Avoid too many return statements within this function.
                                                                                                  Open

                                                                                                          return false;
                                                                                                  Severity: Major
                                                                                                  Found in wp-includes/js/mediaelement/mediaelement.js - About 30 mins to fix

                                                                                                    Avoid too many return statements within this function.
                                                                                                    Open

                                                                                                                return 'video/flv';
                                                                                                    Severity: Major
                                                                                                    Found in wp-includes/js/mediaelement/mediaelement.js - About 30 mins to fix

                                                                                                      Avoid too many return statements within this function.
                                                                                                      Open

                                                                                                                              return arguments.length <= 6 ? undefined : arguments[6];
                                                                                                      Severity: Major
                                                                                                      Found in wp-includes/js/mediaelement/mediaelement.js - About 30 mins to fix

                                                                                                        Avoid too many return statements within this function.
                                                                                                        Open

                                                                                                                                return arguments.length <= 5 ? undefined : arguments[5];
                                                                                                        Severity: Major
                                                                                                        Found in wp-includes/js/mediaelement/mediaelement.js - About 30 mins to fix

                                                                                                          Avoid too many return statements within this function.
                                                                                                          Open

                                                                                                                                  return arguments.length <= 5 ? undefined : arguments[5];
                                                                                                          Severity: Major
                                                                                                          Found in wp-includes/js/mediaelement/mediaelement.js - About 30 mins to fix

                                                                                                            Avoid too many return statements within this function.
                                                                                                            Open

                                                                                                                        return null;
                                                                                                            Severity: Major
                                                                                                            Found in wp-includes/js/mediaelement/mediaelement.js - About 30 mins to fix

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

                                                                                                              },{"18":18,"7":7,"9":9}],6:[function(_dereq_,module,exports){
                                                                                                              'use strict';
                                                                                                              
                                                                                                              Object.defineProperty(exports, "__esModule", {
                                                                                                                  value: true
                                                                                                              Severity: Major
                                                                                                              Found in wp-includes/js/mediaelement/mediaelement.js and 1 other location - About 1 mo to fix
                                                                                                              wp-includes/js/mediaelement/mediaelement-and-player.js on lines 553..1006

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

                                                                                                              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

                                                                                                              },{}],5:[function(_dereq_,module,exports){
                                                                                                              'use strict';
                                                                                                              
                                                                                                              Object.defineProperty(exports, "__esModule", {
                                                                                                                  value: true
                                                                                                              Severity: Major
                                                                                                              Found in wp-includes/js/mediaelement/mediaelement.js and 1 other location - About 1 mo to fix
                                                                                                              wp-includes/js/mediaelement/mediaelement-and-player.js on lines 286..553

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

                                                                                                              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

                                                                                                              },{"16":16,"17":17,"18":18,"19":19,"3":3,"7":7,"8":8}],11:[function(_dereq_,module,exports){
                                                                                                              'use strict';
                                                                                                              
                                                                                                              Object.defineProperty(exports, "__esModule", {
                                                                                                                  value: true
                                                                                                              Severity: Major
                                                                                                              Found in wp-includes/js/mediaelement/mediaelement.js and 1 other location - About 3 wks to fix
                                                                                                              wp-includes/js/mediaelement/mediaelement-and-player.js on lines 5792..6234

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

                                                                                                              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

                                                                                                              },{"16":16,"18":18,"2":2,"3":3,"7":7,"8":8}],15:[function(_dereq_,module,exports){
                                                                                                              'use strict';
                                                                                                              
                                                                                                              var _window = _dereq_(3);
                                                                                                              
                                                                                                              
                                                                                                              Severity: Major
                                                                                                              Found in wp-includes/js/mediaelement/mediaelement.js and 1 other location - About 3 wks to fix
                                                                                                              wp-includes/js/mediaelement/mediaelement-and-player.js on lines 6919..7458

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

                                                                                                              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

                                                                                                              },{"16":16,"17":17,"18":18,"19":19,"3":3,"7":7,"8":8}],13:[function(_dereq_,module,exports){
                                                                                                              'use strict';
                                                                                                              
                                                                                                              var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
                                                                                                              
                                                                                                              
                                                                                                              Severity: Major
                                                                                                              Found in wp-includes/js/mediaelement/mediaelement.js and 1 other location - About 2 wks to fix
                                                                                                              wp-includes/js/mediaelement/mediaelement-and-player.js on lines 6483..6772

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

                                                                                                              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

                                                                                                              },{}],10:[function(_dereq_,module,exports){
                                                                                                              'use strict';
                                                                                                              
                                                                                                              var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
                                                                                                              
                                                                                                              
                                                                                                              Severity: Major
                                                                                                              Found in wp-includes/js/mediaelement/mediaelement.js and 1 other location - About 2 wks to fix
                                                                                                              wp-includes/js/mediaelement/mediaelement-and-player.js on lines 5545..5792

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

                                                                                                              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

                                                                                                              },{"16":16,"18":18,"19":19,"2":2,"3":3,"5":5,"7":7,"8":8}],12:[function(_dereq_,module,exports){
                                                                                                              'use strict';
                                                                                                              
                                                                                                              var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
                                                                                                              
                                                                                                              
                                                                                                              Severity: Major
                                                                                                              Found in wp-includes/js/mediaelement/mediaelement.js and 1 other location - About 2 wks to fix
                                                                                                              wp-includes/js/mediaelement/mediaelement-and-player.js on lines 6234..6483

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

                                                                                                              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

                                                                                                              },{"17":17,"18":18,"19":19,"2":2,"3":3,"7":7,"8":8}],16:[function(_dereq_,module,exports){
                                                                                                              'use strict';
                                                                                                              
                                                                                                              Object.defineProperty(exports, "__esModule", {
                                                                                                                  value: true
                                                                                                              Severity: Major
                                                                                                              Found in wp-includes/js/mediaelement/mediaelement.js and 1 other location - About 2 wks to fix
                                                                                                              wp-includes/js/mediaelement/mediaelement-and-player.js on lines 7458..7644

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

                                                                                                              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

                                                                                                              },{"2":2,"3":3,"7":7}],17:[function(_dereq_,module,exports){
                                                                                                              'use strict';
                                                                                                              
                                                                                                              Object.defineProperty(exports, "__esModule", {
                                                                                                                  value: true
                                                                                                              Severity: Major
                                                                                                              Found in wp-includes/js/mediaelement/mediaelement.js and 1 other location - About 1 wk to fix
                                                                                                              wp-includes/js/mediaelement/mediaelement-and-player.js on lines 7644..7873

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

                                                                                                              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

                                                                                                              },{}],4:[function(_dereq_,module,exports){
                                                                                                              (function (root) {
                                                                                                              
                                                                                                                // Store setTimeout reference so promise-polyfill will be unaffected by
                                                                                                                // other code modifying setTimeout (like sinon.useFakeTimers())
                                                                                                              Severity: Major
                                                                                                              Found in wp-includes/js/mediaelement/mediaelement.js and 1 other location - About 1 wk to fix
                                                                                                              wp-includes/js/mediaelement/mediaelement-and-player.js on lines 51..286

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

                                                                                                              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

                                                                                                              },{"18":18,"7":7}],20:[function(_dereq_,module,exports){
                                                                                                              'use strict';
                                                                                                              
                                                                                                              var _document = _dereq_(2);
                                                                                                              
                                                                                                              
                                                                                                              Severity: Major
                                                                                                              Found in wp-includes/js/mediaelement/mediaelement.js and 1 other location - About 1 wk to fix
                                                                                                              wp-includes/js/mediaelement/mediaelement-and-player.js on lines 8134..8287

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

                                                                                                              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

                                                                                                              },{"16":16,"17":17,"18":18,"19":19,"3":3,"7":7,"8":8}],14:[function(_dereq_,module,exports){
                                                                                                              'use strict';
                                                                                                              
                                                                                                              var _window = _dereq_(3);
                                                                                                              
                                                                                                              
                                                                                                              Severity: Major
                                                                                                              Found in wp-includes/js/mediaelement/mediaelement.js and 1 other location - About 1 wk to fix
                                                                                                              wp-includes/js/mediaelement/mediaelement-and-player.js on lines 6772..6919

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

                                                                                                              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

                                                                                                              },{"3":3}],8:[function(_dereq_,module,exports){
                                                                                                              'use strict';
                                                                                                              
                                                                                                              Object.defineProperty(exports, "__esModule", {
                                                                                                                  value: true
                                                                                                              Severity: Major
                                                                                                              Found in wp-includes/js/mediaelement/mediaelement.js and 1 other location - About 1 wk to fix
                                                                                                              wp-includes/js/mediaelement/mediaelement-and-player.js on lines 1038..1152

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

                                                                                                              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

                                                                                                              },{"2":2,"3":3,"7":7}],18:[function(_dereq_,module,exports){
                                                                                                              'use strict';
                                                                                                              
                                                                                                              Object.defineProperty(exports, "__esModule", {
                                                                                                                  value: true
                                                                                                              Severity: Major
                                                                                                              Found in wp-includes/js/mediaelement/mediaelement.js and 1 other location - About 6 days to fix
                                                                                                              wp-includes/js/mediaelement/mediaelement-and-player.js on lines 7873..8009

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

                                                                                                              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

                                                                                                              },{"7":7}],19:[function(_dereq_,module,exports){
                                                                                                              'use strict';
                                                                                                              
                                                                                                              Object.defineProperty(exports, "__esModule", {
                                                                                                                  value: true
                                                                                                              Severity: Major
                                                                                                              Found in wp-includes/js/mediaelement/mediaelement.js and 1 other location - About 6 days to fix
                                                                                                              wp-includes/js/mediaelement/mediaelement-and-player.js on lines 8009..8134

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

                                                                                                              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

                                                                                                              },{"7":7}],9:[function(_dereq_,module,exports){
                                                                                                              'use strict';
                                                                                                              
                                                                                                              Object.defineProperty(exports, "__esModule", {
                                                                                                                  value: true
                                                                                                              Severity: Major
                                                                                                              Found in wp-includes/js/mediaelement/mediaelement.js and 1 other location - About 2 days to fix
                                                                                                              wp-includes/js/mediaelement/mediaelement-and-player.js on lines 3385..3475

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

                                                                                                              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 3 locations. Consider refactoring.
                                                                                                              Open

                                                                                                               */(function(){function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}return e})()({1:[function(_dereq_,module,exports){
                                                                                                              
                                                                                                              },{}],2:[function(_dereq_,module,exports){
                                                                                                              (function (global){
                                                                                                              var topLevel = typeof global !== 'undefined' ? global :
                                                                                                              Severity: Major
                                                                                                              Found in wp-includes/js/mediaelement/mediaelement.js and 2 other locations - About 1 day to fix
                                                                                                              wp-includes/js/mediaelement/mediaelement-and-player.js on lines 11..8540
                                                                                                              wp-includes/js/mediaelement/renderers/vimeo.js on lines 11..432

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

                                                                                                              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

                                                                                                              },{"16":16,"18":18,"19":19,"2":2,"3":3,"7":7,"8":8}],7:[function(_dereq_,module,exports){
                                                                                                              'use strict';
                                                                                                              
                                                                                                              Object.defineProperty(exports, "__esModule", {
                                                                                                                  value: true
                                                                                                              Severity: Major
                                                                                                              Found in wp-includes/js/mediaelement/mediaelement.js and 1 other location - About 1 day to fix
                                                                                                              wp-includes/js/mediaelement/mediaelement-and-player.js on lines 1006..1038

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

                                                                                                              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

                                                                                                              },{}],2:[function(_dereq_,module,exports){
                                                                                                              (function (global){
                                                                                                              var topLevel = typeof global !== 'undefined' ? global :
                                                                                                                  typeof window !== 'undefined' ? window : {}
                                                                                                              var minDoc = _dereq_(1);
                                                                                                              Severity: Major
                                                                                                              Found in wp-includes/js/mediaelement/mediaelement.js and 1 other location - About 1 day to fix
                                                                                                              wp-includes/js/mediaelement/mediaelement-and-player.js on lines 13..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 195.

                                                                                                              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

                                                                                                              },{"1":1}],3:[function(_dereq_,module,exports){
                                                                                                              (function (global){
                                                                                                              var win;
                                                                                                              
                                                                                                              if (typeof window !== "undefined") {
                                                                                                              Severity: Major
                                                                                                              Found in wp-includes/js/mediaelement/mediaelement.js and 1 other location - About 6 hrs to fix
                                                                                                              wp-includes/js/mediaelement/mediaelement-and-player.js on lines 34..51

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

                                                                                                              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

                                                                                                              There are no issues that match your filters.

                                                                                                              Category
                                                                                                              Status