WordPress/WordPress

View on GitHub
wp-includes/js/dist/compose.js

Summary

Maintainability
F
3 mos
Test Coverage

File compose.js has 2841 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/******/ (() => { // webpackBootstrap
/******/     var __webpack_modules__ = ({

/***/ 6689:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
Severity: Major
Found in wp-includes/js/dist/compose.js - About 1 wk to fix

    Function 1933 has 450 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    /***/ ((module, exports, __webpack_require__) => {
    
    var __WEBPACK_AMD_DEFINE_RESULT__;/*global define:false */
    /**
     * Copyright 2012-2017 Craig Campbell
    Severity: Major
    Found in wp-includes/js/dist/compose.js - About 2 days to fix

      Function 3758 has 422 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      /***/ (function(module) {
      
      /*!
       * clipboard.js v2.0.11
       * https://clipboardjs.com/
      Severity: Major
      Found in wp-includes/js/dist/compose.js - About 2 days to fix

        Function 686 has 213 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        /***/ (function(__unused_webpack_module, __nested_webpack_exports__, __nested_webpack_require_623__) {
        
        "use strict";
        
        // EXPORTS
        Severity: Major
        Found in wp-includes/js/dist/compose.js - About 1 day to fix

          Function Mousetrap has 167 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function Mousetrap(targetElement) {
                  var self = this;
          
                  targetElement = targetElement || document;
          
          
          Severity: Major
          Found in wp-includes/js/dist/compose.js - About 6 hrs to fix

            Function 6689 has 111 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
            
            "use strict";
            /* harmony export */ __webpack_require__.d(__webpack_exports__, {
            /* harmony export */   createUndoManager: () => (/* binding */ createUndoManager)
            Severity: Major
            Found in wp-includes/js/dist/compose.js - About 4 hrs to fix

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

              const debounce = (func, wait, options) => {
                let lastArgs;
                let lastThis;
                let maxWait = 0;
                let result;
              Severity: Major
              Found in wp-includes/js/dist/compose.js - About 4 hrs to fix

                Function Clipboard has 99 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                var Clipboard = /*#__PURE__*/function (_Emitter) {
                  _inherits(Clipboard, _Emitter);
                
                  var _super = _createSuper(Clipboard);
                
                
                Severity: Major
                Found in wp-includes/js/dist/compose.js - About 3 hrs to fix

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

                  function useFixedWindowList(elementRef, itemHeight, totalItems, options) {
                    var _options$initWindowSi, _options$useWindowing;
                    const initWindowSize = (_options$initWindowSi = options?.initWindowSize) !== null && _options$initWindowSi !== void 0 ? _options$initWindowSi : DEFAULT_INIT_WINDOW_SIZE;
                    const useWindowing = (_options$useWindowing = options?.useWindowing) !== null && _options$useWindowing !== void 0 ? _options$useWindowing : true;
                    const [fixedListWindow, setFixedListWindow] = (0,external_wp_element_namespaceObject.useState)({
                  Severity: Major
                  Found in wp-includes/js/dist/compose.js - About 3 hrs to fix

                    Function createUndoManager has 76 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function createUndoManager() {
                      /**
                       * @type {HistoryRecord[]}
                       */
                      let history = [];
                    Severity: Major
                    Found in wp-includes/js/dist/compose.js - About 3 hrs to fix

                      Function useResizeObserver has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function useResizeObserver(opts = {}) {
                        // Saving the callback as a ref. With this, I don't need to put onResize in the
                        // effect dep array, and just passing in an anonymous function without memoising
                        // will not reinstantiate the hook's ResizeObserver.
                        const onResize = opts.onResize;
                      Severity: Major
                      Found in wp-includes/js/dist/compose.js - About 2 hrs to fix

                        Function useFocusOutside has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function useFocusOutside(onFocusOutside) {
                          const currentOnFocusOutside = (0,external_wp_element_namespaceObject.useRef)(onFocusOutside);
                          (0,external_wp_element_namespaceObject.useEffect)(() => {
                            currentOnFocusOutside.current = onFocusOutside;
                          }, [onFocusOutside]);
                        Severity: Major
                        Found in wp-includes/js/dist/compose.js - About 2 hrs to fix

                          Function 370 has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_19113__) {
                          
                          var is = __nested_webpack_require_19113__(879);
                          var delegate = __nested_webpack_require_19113__(438);
                          
                          
                          Severity: Minor
                          Found in wp-includes/js/dist/compose.js - About 1 hr to fix

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

                            /***/ (function(module) {
                            
                            function E () {
                              // Keep this empty so it's easier to inherit from
                              // (via https://github.com/lipsmack from https://github.com/scottcorgan/tiny-emitter/issues/3)
                            Severity: Minor
                            Found in wp-includes/js/dist/compose.js - About 1 hr to fix

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

                              function withGlobalEvents(eventTypesToHandlers) {
                                external_wp_deprecated_default()('wp.compose.withGlobalEvents', {
                                  since: '5.7',
                                  alternative: 'useEffect'
                                });
                              Severity: Minor
                              Found in wp-includes/js/dist/compose.js - About 1 hr to fix

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

                                function undoRedoReducer(state, action) {
                                  switch (action.type) {
                                    case 'UNDO':
                                      {
                                        const undoRecord = state.manager.undo();
                                Severity: Minor
                                Found in wp-includes/js/dist/compose.js - About 1 hr to fix

                                  Function refCallback has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                    const refCallback = useResolvedElement((0,external_wp_element_namespaceObject.useCallback)(element => {
                                      // We only use a single Resize Observer instance, and we're instantiating it on demand, only once there's something to observe.
                                      // This instance is also recreated when the `box` option changes, so that a new observation is fired if there was a previously observed element with a different box option.
                                      if (!resizeObserverRef.current || resizeObserverRef.current.box !== opts.box || resizeObserverRef.current.round !== round) {
                                        resizeObserverRef.current = {
                                  Severity: Minor
                                  Found in wp-includes/js/dist/compose.js - About 1 hr to fix

                                    Function useResolvedElement has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    function useResolvedElement(subscriber, refOrElement) {
                                      const callbackRefElement = (0,external_wp_element_namespaceObject.useRef)(null);
                                      const lastReportRef = (0,external_wp_element_namespaceObject.useRef)(null);
                                      const cleanupRef = (0,external_wp_element_namespaceObject.useRef)();
                                      const callSubscriber = (0,external_wp_element_namespaceObject.useCallback)(() => {
                                    Severity: Minor
                                    Found in wp-includes/js/dist/compose.js - About 1 hr to fix

                                      Function useFocusOnMount has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      function useFocusOnMount(focusOnMount = 'firstElement') {
                                        const focusOnMountRef = (0,external_wp_element_namespaceObject.useRef)(focusOnMount);
                                      
                                        /**
                                         * Sets focus on a DOM element.
                                      Severity: Minor
                                      Found in wp-includes/js/dist/compose.js - About 1 hr to fix

                                        Function useCopyOnClick has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        function useCopyOnClick(ref, text, timeout = 4000) {
                                          /* eslint-enable jsdoc/no-undefined-types */
                                          external_wp_deprecated_default()('wp.compose.useCopyOnClick', {
                                            since: '5.8',
                                            alternative: 'wp.compose.useCopyToClipboard'
                                        Severity: Minor
                                        Found in wp-includes/js/dist/compose.js - About 1 hr to fix

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

                                          /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_15749__) {
                                          
                                          var closest = __nested_webpack_require_15749__(828);
                                          
                                          /**
                                          Severity: Minor
                                          Found in wp-includes/js/dist/compose.js - About 1 hr to fix

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

                                            function useDialog(options) {
                                              const currentOptions = (0,external_wp_element_namespaceObject.useRef)();
                                              const {
                                                constrainTabbing = options.focusOnMount !== false
                                              } = options;
                                            Severity: Minor
                                            Found in wp-includes/js/dist/compose.js - About 1 hr to fix

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

                                              /***/ (function(module) {
                                              
                                              function select(element) {
                                                  var selectedText;
                                              
                                              
                                              Severity: Minor
                                              Found in wp-includes/js/dist/compose.js - About 1 hr to fix

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

                                                const withSafeTimeout = createHigherOrderComponent(OriginalComponent => {
                                                  return class WrappedComponent extends external_wp_element_namespaceObject.Component {
                                                    constructor(props) {
                                                      super(props);
                                                      this.timeouts = [];
                                                Severity: Minor
                                                Found in wp-includes/js/dist/compose.js - About 1 hr to fix

                                                  Function ClipboardActionDefault has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                                  Open

                                                  var ClipboardActionDefault = function ClipboardActionDefault() {
                                                    var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
                                                    // Defines base properties passed from constructor.
                                                    var _options$action = options.action,
                                                        action = _options$action === void 0 ? 'copy' : _options$action,
                                                  Severity: Minor
                                                  Found in wp-includes/js/dist/compose.js - About 1 hr to fix

                                                    Function useConstrainedTabbing has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                                    Open

                                                    function useConstrainedTabbing() {
                                                      return useRefEffect(( /** @type {HTMLElement} */node) => {
                                                        function onKeyDown( /** @type {KeyboardEvent} */event) {
                                                          const {
                                                            key,
                                                    Severity: Minor
                                                    Found in wp-includes/js/dist/compose.js - About 1 hr to fix

                                                      Function useMergeRefs has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                                      Open

                                                      function useMergeRefs(refs) {
                                                        const element = (0,external_wp_element_namespaceObject.useRef)();
                                                        const isAttached = (0,external_wp_element_namespaceObject.useRef)(false);
                                                        const didElementChange = (0,external_wp_element_namespaceObject.useRef)(false);
                                                        /* eslint-disable jsdoc/no-undefined-types */
                                                      Severity: Minor
                                                      Found in wp-includes/js/dist/compose.js - About 1 hr to fix

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

                                                        function select(element) {
                                                            var selectedText;
                                                        
                                                            if (element.nodeName === 'SELECT') {
                                                                element.focus();
                                                        Severity: Minor
                                                        Found in wp-includes/js/dist/compose.js - About 1 hr to fix

                                                          Function 5760 has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                                          Open

                                                          /***/ (() => {
                                                          
                                                          /**
                                                           * adds a bindGlobal method to Mousetrap that allows you to
                                                           * bind specific keyboard shortcuts that will still work
                                                          Severity: Minor
                                                          Found in wp-includes/js/dist/compose.js - About 1 hr to fix

                                                            Function _handleKey has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                                            Open

                                                                    self._handleKey = function(character, modifiers, e) {
                                                                        var callbacks = _getMatches(character, modifiers, e);
                                                                        var i;
                                                                        var doNotReset = {};
                                                                        var maxLevel = 0;
                                                            Severity: Minor
                                                            Found in wp-includes/js/dist/compose.js - About 1 hr to fix

                                                              Function _getMatches has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                                              Open

                                                                      function _getMatches(character, modifiers, e, sequenceName, combination, level) {
                                                                          var i;
                                                                          var callback;
                                                                          var matches = [];
                                                                          var action = e.type;
                                                              Severity: Minor
                                                              Found in wp-includes/js/dist/compose.js - About 1 hr to fix

                                                                Function useFocusReturn has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                Open

                                                                function useFocusReturn(onFocusReturn) {
                                                                  /** @type {import('react').MutableRefObject<null | HTMLElement>} */
                                                                  const ref = (0,external_wp_element_namespaceObject.useRef)(null);
                                                                  /** @type {import('react').MutableRefObject<null | Element>} */
                                                                  const focusedBeforeMount = (0,external_wp_element_namespaceObject.useRef)(null);
                                                                Severity: Minor
                                                                Found in wp-includes/js/dist/compose.js - About 1 hr to fix

                                                                  Function useResizeAware has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                  Open

                                                                  function useResizeAware() {
                                                                    const {
                                                                      ref,
                                                                      width,
                                                                      height
                                                                  Severity: Minor
                                                                  Found in wp-includes/js/dist/compose.js - About 1 hr to fix

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

                                                                        const handleKeyDown = ( /** @type {KeyboardEvent} */event) => {
                                                                          switch (event.keyCode) {
                                                                            case external_wp_keycodes_namespaceObject.HOME:
                                                                              {
                                                                                return scrollContainer?.scrollTo({
                                                                    Severity: Minor
                                                                    Found in wp-includes/js/dist/compose.js - About 1 hr to fix

                                                                      Consider simplifying this complex logical expression.
                                                                      Open

                                                                                      if ((action == 'keypress' && !e.metaKey && !e.ctrlKey) || _modifiersMatch(modifiers, callback.modifiers)) {
                                                                      
                                                                                          // when you bind a combination or sequence a second time it
                                                                                          // should overwrite the first one.  if a sequenceName or
                                                                                          // combination is specified in this call it does just that
                                                                      Severity: Major
                                                                      Found in wp-includes/js/dist/compose.js - About 1 hr to fix

                                                                        Function __esDecorate has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                                        Open

                                                                        function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
                                                                        Severity: Minor
                                                                        Found in wp-includes/js/dist/compose.js - About 45 mins to fix

                                                                          Function _getMatches has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                                          Open

                                                                                  function _getMatches(character, modifiers, e, sequenceName, combination, level) {
                                                                          Severity: Minor
                                                                          Found in wp-includes/js/dist/compose.js - About 45 mins to fix

                                                                            Consider simplifying this complex logical expression.
                                                                            Open

                                                                            if (typeof Element !== 'undefined' && !Element.prototype.matches) {
                                                                                var proto = Element.prototype;
                                                                            
                                                                                proto.matches = proto.matchesSelector ||
                                                                                                proto.mozMatchesSelector ||
                                                                            Severity: Major
                                                                            Found in wp-includes/js/dist/compose.js - About 40 mins to fix

                                                                              Consider simplifying this complex logical expression.
                                                                              Open

                                                                                    if ((0,external_wp_keycodes_namespaceObject.isAppleOS)() && (modifiers.size === 1 && hasAlt || modifiers.size === 2 && hasAlt && hasShift)) {
                                                                                      throw new Error(`Cannot bind ${shortcut}. Alt and Shift+Alt modifiers are reserved for character input.`);
                                                                                    }
                                                                              Severity: Major
                                                                              Found in wp-includes/js/dist/compose.js - About 40 mins to fix

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

                                                                                function delegate(elements, selector, type, callback, useCapture) {
                                                                                Severity: Minor
                                                                                Found in wp-includes/js/dist/compose.js - About 35 mins to fix

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

                                                                                          function _bindSingle(combination, callback, action, sequenceName, level) {
                                                                                  Severity: Minor
                                                                                  Found in wp-includes/js/dist/compose.js - About 35 mins to fix

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

                                                                                    function __classPrivateFieldSet(receiver, state, value, kind, f) {
                                                                                    Severity: Minor
                                                                                    Found in wp-includes/js/dist/compose.js - About 35 mins to fix

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

                                                                                      function _delegate(element, selector, type, callback, useCapture) {
                                                                                      Severity: Minor
                                                                                      Found in wp-includes/js/dist/compose.js - About 35 mins to fix

                                                                                        Avoid too many return statements within this function.
                                                                                        Open

                                                                                        function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
                                                                                        Severity: Major
                                                                                        Found in wp-includes/js/dist/compose.js - About 30 mins to fix

                                                                                          Avoid too many return statements within this function.
                                                                                          Open

                                                                                                  return {
                                                                                                    ...state,
                                                                                                    value: action.value
                                                                                                  };
                                                                                          Severity: Major
                                                                                          Found in wp-includes/js/dist/compose.js - About 30 mins to fix

                                                                                            Avoid too many return statements within this function.
                                                                                            Open

                                                                                              return state;
                                                                                            Severity: Major
                                                                                            Found in wp-includes/js/dist/compose.js - About 30 mins to fix

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

                                                                                              (function webpackUniversalModuleDefinition(root, factory) {
                                                                                                  if(true)
                                                                                                      module.exports = factory();
                                                                                                  else {}
                                                                                              })(this, function() {
                                                                                              Severity: Major
                                                                                              Found in wp-includes/js/dist/compose.js and 1 other location - About 1 mo to fix
                                                                                              wp-includes/js/clipboard.js on lines 7..890

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

                                                                                              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

                                                                                              /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
                                                                                              
                                                                                              "use strict";
                                                                                              /* harmony export */ __webpack_require__.d(__webpack_exports__, {
                                                                                              /* harmony export */   createUndoManager: () => (/* binding */ createUndoManager)
                                                                                              Severity: Major
                                                                                              Found in wp-includes/js/dist/compose.js and 1 other location - About 5 days to fix
                                                                                              wp-includes/js/dist/core-data.js on lines 6..185

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

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

                                                                                              function __generator(thisArg, body) {
                                                                                                var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
                                                                                                return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
                                                                                                function verb(n) { return function (v) { return step([n, v]); }; }
                                                                                                function step(op) {
                                                                                              Severity: Major
                                                                                              Found in wp-includes/js/dist/compose.js and 6 other locations - About 5 days to fix
                                                                                              wp-includes/js/dist/block-directory.js on lines 835..861
                                                                                              wp-includes/js/dist/commands.js on lines 1732..1758
                                                                                              wp-includes/js/dist/core-data.js on lines 1056..1082
                                                                                              wp-includes/js/dist/element.js on lines 1001..1027
                                                                                              wp-includes/js/dist/list-reusable-blocks.js on lines 183..209
                                                                                              wp-includes/js/dist/style-engine.js on lines 171..197

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

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

                                                                                              function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
                                                                                                function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
                                                                                                var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
                                                                                                var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
                                                                                                var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
                                                                                              Severity: Major
                                                                                              Found in wp-includes/js/dist/compose.js and 6 other locations - About 3 days to fix
                                                                                              wp-includes/js/dist/block-directory.js on lines 776..802
                                                                                              wp-includes/js/dist/commands.js on lines 1673..1699
                                                                                              wp-includes/js/dist/core-data.js on lines 997..1023
                                                                                              wp-includes/js/dist/element.js on lines 942..968
                                                                                              wp-includes/js/dist/list-reusable-blocks.js on lines 124..150
                                                                                              wp-includes/js/dist/style-engine.js on lines 112..138

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

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

                                                                                              function __asyncGenerator(thisArg, _arguments, generator) {
                                                                                                if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
                                                                                                var g = generator.apply(thisArg, _arguments || []), i, q = [];
                                                                                                return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
                                                                                                function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
                                                                                              Severity: Major
                                                                                              Found in wp-includes/js/dist/compose.js and 6 other locations - About 2 days to fix
                                                                                              wp-includes/js/dist/block-directory.js on lines 938..948
                                                                                              wp-includes/js/dist/commands.js on lines 1835..1845
                                                                                              wp-includes/js/dist/core-data.js on lines 1159..1169
                                                                                              wp-includes/js/dist/element.js on lines 1104..1114
                                                                                              wp-includes/js/dist/list-reusable-blocks.js on lines 286..296
                                                                                              wp-includes/js/dist/style-engine.js on lines 274..284

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

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

                                                                                              function __asyncValues(o) {
                                                                                                if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
                                                                                                var m = o[Symbol.asyncIterator], i;
                                                                                                return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
                                                                                                function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
                                                                                              Severity: Major
                                                                                              Found in wp-includes/js/dist/compose.js and 6 other locations - About 1 day to fix
                                                                                              wp-includes/js/dist/block-directory.js on lines 956..962
                                                                                              wp-includes/js/dist/commands.js on lines 1853..1859
                                                                                              wp-includes/js/dist/core-data.js on lines 1177..1183
                                                                                              wp-includes/js/dist/element.js on lines 1122..1128
                                                                                              wp-includes/js/dist/list-reusable-blocks.js on lines 304..310
                                                                                              wp-includes/js/dist/style-engine.js on lines 292..298

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

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

                                                                                              function noCase(input, options) {
                                                                                                  if (options === void 0) { options = {}; }
                                                                                                  var _a = options.splitRegexp, splitRegexp = _a === void 0 ? DEFAULT_SPLIT_REGEXP : _a, _b = options.stripRegexp, stripRegexp = _b === void 0 ? DEFAULT_STRIP_REGEXP : _b, _c = options.transform, transform = _c === void 0 ? lowerCase : _c, _d = options.delimiter, delimiter = _d === void 0 ? " " : _d;
                                                                                                  var result = replace(replace(input, splitRegexp, "$1\0$2"), stripRegexp, "\0");
                                                                                                  var start = 0;
                                                                                              Severity: Major
                                                                                              Found in wp-includes/js/dist/compose.js and 5 other locations - About 1 day to fix
                                                                                              wp-includes/js/dist/block-directory.js on lines 1140..1153
                                                                                              wp-includes/js/dist/core-data.js on lines 1361..1374
                                                                                              wp-includes/js/dist/element.js on lines 1306..1319
                                                                                              wp-includes/js/dist/list-reusable-blocks.js on lines 488..501
                                                                                              wp-includes/js/dist/style-engine.js on lines 476..489

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

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

                                                                                              function __awaiter(thisArg, _arguments, P, generator) {
                                                                                                function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
                                                                                                return new (P || (P = Promise))(function (resolve, reject) {
                                                                                                    function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
                                                                                                    function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
                                                                                              Severity: Major
                                                                                              Found in wp-includes/js/dist/compose.js and 6 other locations - About 1 day to fix
                                                                                              wp-includes/js/dist/block-directory.js on lines 825..833
                                                                                              wp-includes/js/dist/commands.js on lines 1722..1730
                                                                                              wp-includes/js/dist/core-data.js on lines 1046..1054
                                                                                              wp-includes/js/dist/element.js on lines 991..999
                                                                                              wp-includes/js/dist/list-reusable-blocks.js on lines 173..181
                                                                                              wp-includes/js/dist/style-engine.js on lines 161..169

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

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

                                                                                              function __addDisposableResource(env, value, async) {
                                                                                                if (value !== null && value !== void 0) {
                                                                                                  if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
                                                                                                  var dispose;
                                                                                                  if (async) {
                                                                                              Severity: Major
                                                                                              Found in wp-includes/js/dist/compose.js and 6 other locations - About 1 day to fix
                                                                                              wp-includes/js/dist/block-directory.js on lines 1005..1024
                                                                                              wp-includes/js/dist/commands.js on lines 1902..1921
                                                                                              wp-includes/js/dist/core-data.js on lines 1226..1245
                                                                                              wp-includes/js/dist/element.js on lines 1171..1190
                                                                                              wp-includes/js/dist/list-reusable-blocks.js on lines 353..372
                                                                                              wp-includes/js/dist/style-engine.js on lines 341..360

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

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

                                                                                              function __disposeResources(env) {
                                                                                                function fail(e) {
                                                                                                  env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
                                                                                                  env.hasError = true;
                                                                                                }
                                                                                              Severity: Major
                                                                                              Found in wp-includes/js/dist/compose.js and 6 other locations - About 1 day to fix
                                                                                              wp-includes/js/dist/block-directory.js on lines 1031..1050
                                                                                              wp-includes/js/dist/commands.js on lines 1928..1947
                                                                                              wp-includes/js/dist/core-data.js on lines 1252..1271
                                                                                              wp-includes/js/dist/element.js on lines 1197..1216
                                                                                              wp-includes/js/dist/list-reusable-blocks.js on lines 379..398
                                                                                              wp-includes/js/dist/style-engine.js on lines 367..386

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

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

                                                                                              function __read(o, n) {
                                                                                                var m = typeof Symbol === "function" && o[Symbol.iterator];
                                                                                                if (!m) return o;
                                                                                                var i = m.call(o), r, ar = [], e;
                                                                                                try {
                                                                                              Severity: Major
                                                                                              Found in wp-includes/js/dist/compose.js and 6 other locations - About 1 day to fix
                                                                                              wp-includes/js/dist/block-directory.js on lines 891..906
                                                                                              wp-includes/js/dist/commands.js on lines 1788..1803
                                                                                              wp-includes/js/dist/core-data.js on lines 1112..1127
                                                                                              wp-includes/js/dist/element.js on lines 1057..1072
                                                                                              wp-includes/js/dist/list-reusable-blocks.js on lines 239..254
                                                                                              wp-includes/js/dist/style-engine.js on lines 227..242

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

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

                                                                                              function __decorate(decorators, target, key, desc) {
                                                                                                var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
                                                                                                if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
                                                                                                else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
                                                                                                return c > 3 && r && Object.defineProperty(target, key, r), r;
                                                                                              Severity: Major
                                                                                              Found in wp-includes/js/dist/compose.js and 6 other locations - About 1 day to fix
                                                                                              wp-includes/js/dist/block-directory.js on lines 765..770
                                                                                              wp-includes/js/dist/commands.js on lines 1662..1667
                                                                                              wp-includes/js/dist/core-data.js on lines 986..991
                                                                                              wp-includes/js/dist/element.js on lines 931..936
                                                                                              wp-includes/js/dist/list-reusable-blocks.js on lines 113..118
                                                                                              wp-includes/js/dist/style-engine.js on lines 101..106

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

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

                                                                                              function __rest(s, e) {
                                                                                                var t = {};
                                                                                                for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
                                                                                                    t[p] = s[p];
                                                                                                if (s != null && typeof Object.getOwnPropertySymbols === "function")
                                                                                              Severity: Major
                                                                                              Found in wp-includes/js/dist/compose.js and 6 other locations - About 1 day to fix
                                                                                              wp-includes/js/dist/block-directory.js on lines 753..763
                                                                                              wp-includes/js/dist/commands.js on lines 1650..1660
                                                                                              wp-includes/js/dist/core-data.js on lines 974..984
                                                                                              wp-includes/js/dist/element.js on lines 919..929
                                                                                              wp-includes/js/dist/list-reusable-blocks.js on lines 101..111
                                                                                              wp-includes/js/dist/style-engine.js on lines 89..99

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

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

                                                                                              var __createBinding = Object.create ? (function(o, m, k, k2) {
                                                                                                if (k2 === undefined) k2 = k;
                                                                                                var desc = Object.getOwnPropertyDescriptor(m, k);
                                                                                                if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
                                                                                                    desc = { enumerable: true, get: function() { return m[k]; } };
                                                                                              Severity: Major
                                                                                              Found in wp-includes/js/dist/compose.js and 6 other locations - About 7 hrs to fix
                                                                                              wp-includes/js/dist/block-directory.js on lines 863..873
                                                                                              wp-includes/js/dist/commands.js on lines 1760..1770
                                                                                              wp-includes/js/dist/core-data.js on lines 1084..1094
                                                                                              wp-includes/js/dist/element.js on lines 1029..1039
                                                                                              wp-includes/js/dist/list-reusable-blocks.js on lines 211..221
                                                                                              wp-includes/js/dist/style-engine.js on lines 199..209

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

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

                                                                                              function __values(o) {
                                                                                                var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
                                                                                                if (m) return m.call(o);
                                                                                                if (o && typeof o.length === "number") return {
                                                                                                    next: function () {
                                                                                              Severity: Major
                                                                                              Found in wp-includes/js/dist/compose.js and 6 other locations - About 6 hrs to fix
                                                                                              wp-includes/js/dist/block-directory.js on lines 879..889
                                                                                              wp-includes/js/dist/commands.js on lines 1776..1786
                                                                                              wp-includes/js/dist/core-data.js on lines 1100..1110
                                                                                              wp-includes/js/dist/element.js on lines 1045..1055
                                                                                              wp-includes/js/dist/list-reusable-blocks.js on lines 227..237
                                                                                              wp-includes/js/dist/style-engine.js on lines 215..225

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

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

                                                                                              function __asyncDelegator(o) {
                                                                                                var i, p;
                                                                                                return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
                                                                                                function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }
                                                                                              }
                                                                                              Severity: Major
                                                                                              Found in wp-includes/js/dist/compose.js and 6 other locations - About 6 hrs to fix
                                                                                              wp-includes/js/dist/block-directory.js on lines 950..954
                                                                                              wp-includes/js/dist/commands.js on lines 1847..1851
                                                                                              wp-includes/js/dist/core-data.js on lines 1171..1175
                                                                                              wp-includes/js/dist/element.js on lines 1116..1120
                                                                                              wp-includes/js/dist/list-reusable-blocks.js on lines 298..302
                                                                                              wp-includes/js/dist/style-engine.js on lines 286..290

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

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

                                                                                              function __spreadArray(to, from, pack) {
                                                                                                if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
                                                                                                    if (ar || !(i in from)) {
                                                                                                        if (!ar) ar = Array.prototype.slice.call(from, 0, i);
                                                                                                        ar[i] = from[i];
                                                                                              Severity: Major
                                                                                              Found in wp-includes/js/dist/compose.js and 6 other locations - About 6 hrs to fix
                                                                                              wp-includes/js/dist/block-directory.js on lines 924..932
                                                                                              wp-includes/js/dist/commands.js on lines 1821..1829
                                                                                              wp-includes/js/dist/core-data.js on lines 1145..1153
                                                                                              wp-includes/js/dist/element.js on lines 1090..1098
                                                                                              wp-includes/js/dist/list-reusable-blocks.js on lines 272..280
                                                                                              wp-includes/js/dist/style-engine.js on lines 260..268

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

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

                                                                                              function __spreadArrays() {
                                                                                                for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
                                                                                                for (var r = Array(s), k = 0, i = 0; i < il; i++)
                                                                                                    for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
                                                                                                        r[k] = a[j];
                                                                                              Severity: Major
                                                                                              Found in wp-includes/js/dist/compose.js and 6 other locations - About 5 hrs to fix
                                                                                              wp-includes/js/dist/block-directory.js on lines 916..922
                                                                                              wp-includes/js/dist/commands.js on lines 1813..1819
                                                                                              wp-includes/js/dist/core-data.js on lines 1137..1143
                                                                                              wp-includes/js/dist/element.js on lines 1082..1088
                                                                                              wp-includes/js/dist/list-reusable-blocks.js on lines 264..270
                                                                                              wp-includes/js/dist/style-engine.js on lines 252..258

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

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

                                                                                              /* harmony default export */ const tslib_es6 = ({
                                                                                                __extends,
                                                                                                __assign,
                                                                                                __rest,
                                                                                                __decorate,
                                                                                              Severity: Major
                                                                                              Found in wp-includes/js/dist/compose.js and 6 other locations - About 5 hrs to fix
                                                                                              wp-includes/js/dist/block-directory.js on lines 1052..1080
                                                                                              wp-includes/js/dist/commands.js on lines 1949..1977
                                                                                              wp-includes/js/dist/core-data.js on lines 1273..1301
                                                                                              wp-includes/js/dist/element.js on lines 1218..1246
                                                                                              wp-includes/js/dist/list-reusable-blocks.js on lines 400..428
                                                                                              wp-includes/js/dist/style-engine.js on lines 388..416

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

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

                                                                                              var __assign = function() {
                                                                                                __assign = Object.assign || function __assign(t) {
                                                                                                    for (var s, i = 1, n = arguments.length; i < n; i++) {
                                                                                                        s = arguments[i];
                                                                                                        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
                                                                                              Severity: Major
                                                                                              Found in wp-includes/js/dist/compose.js and 6 other locations - About 5 hrs to fix
                                                                                              wp-includes/js/dist/block-directory.js on lines 742..751
                                                                                              wp-includes/js/dist/commands.js on lines 1639..1648
                                                                                              wp-includes/js/dist/core-data.js on lines 963..972
                                                                                              wp-includes/js/dist/element.js on lines 908..917
                                                                                              wp-includes/js/dist/list-reusable-blocks.js on lines 90..99
                                                                                              wp-includes/js/dist/style-engine.js on lines 78..87

                                                                                              Duplicated Code

                                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                              Tuning

                                                                                              This issue has a mass of 142.

                                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                              Refactorings

                                                                                              Further Reading

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

                                                                                              function __classPrivateFieldSet(receiver, state, value, kind, f) {
                                                                                                if (kind === "m") throw new TypeError("Private method is not writable");
                                                                                                if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
                                                                                                if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
                                                                                                return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
                                                                                              Severity: Major
                                                                                              Found in wp-includes/js/dist/compose.js and 6 other locations - About 5 hrs to fix
                                                                                              wp-includes/js/dist/block-directory.js on lines 993..998
                                                                                              wp-includes/js/dist/commands.js on lines 1890..1895
                                                                                              wp-includes/js/dist/core-data.js on lines 1214..1219
                                                                                              wp-includes/js/dist/element.js on lines 1159..1164
                                                                                              wp-includes/js/dist/list-reusable-blocks.js on lines 341..346
                                                                                              wp-includes/js/dist/style-engine.js on lines 329..334

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

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

                                                                                              var extendStatics = function(d, b) {
                                                                                                extendStatics = Object.setPrototypeOf ||
                                                                                                    ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
                                                                                                    function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
                                                                                                return extendStatics(d, b);
                                                                                              Severity: Major
                                                                                              Found in wp-includes/js/dist/compose.js and 6 other locations - About 4 hrs to fix
                                                                                              wp-includes/js/dist/block-directory.js on lines 727..732
                                                                                              wp-includes/js/dist/commands.js on lines 1624..1629
                                                                                              wp-includes/js/dist/core-data.js on lines 948..953
                                                                                              wp-includes/js/dist/element.js on lines 893..898
                                                                                              wp-includes/js/dist/list-reusable-blocks.js on lines 75..80
                                                                                              wp-includes/js/dist/style-engine.js on lines 63..68

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

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

                                                                                              /******/     (() => {
                                                                                              /******/         // define getter functions for harmony exports
                                                                                              /******/         __webpack_require__.d = (exports, definition) => {
                                                                                              /******/             for(var key in definition) {
                                                                                              /******/                 if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
                                                                                              Severity: Major
                                                                                              Found in wp-includes/js/dist/compose.js and 22 other locations - About 4 hrs to fix
                                                                                              wp-includes/js/dist/a11y.js on lines 20..29
                                                                                              wp-includes/js/dist/block-directory.js on lines 20..29
                                                                                              wp-includes/js/dist/commands.js on lines 252..261
                                                                                              wp-includes/js/dist/core-data.js on lines 627..636
                                                                                              wp-includes/js/dist/customize-widgets.js on lines 190..199
                                                                                              wp-includes/js/dist/data-controls.js on lines 20..29
                                                                                              wp-includes/js/dist/data.js on lines 499..508
                                                                                              wp-includes/js/dist/dom.js on lines 20..29
                                                                                              wp-includes/js/dist/edit-post.js on lines 110..119
                                                                                              wp-includes/js/dist/edit-widgets.js on lines 110..119
                                                                                              wp-includes/js/dist/i18n.js on lines 283..292
                                                                                              wp-includes/js/dist/list-reusable-blocks.js on lines 20..29
                                                                                              wp-includes/js/dist/media-utils.js on lines 20..29
                                                                                              wp-includes/js/dist/nux.js on lines 20..29
                                                                                              wp-includes/js/dist/plugins.js on lines 20..29
                                                                                              wp-includes/js/dist/preferences-persistence.js on lines 20..29
                                                                                              wp-includes/js/dist/preferences.js on lines 20..29
                                                                                              wp-includes/js/dist/primitives.js on lines 110..119
                                                                                              wp-includes/js/dist/server-side-render.js on lines 124..133
                                                                                              wp-includes/js/dist/undo-manager.js on lines 52..61
                                                                                              wp-includes/js/dist/url.js on lines 532..541
                                                                                              wp-includes/js/dist/widgets.js on lines 110..119

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

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

                                                                                              function __classPrivateFieldGet(receiver, state, kind, f) {
                                                                                                if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
                                                                                                if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
                                                                                                return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
                                                                                              }
                                                                                              Severity: Major
                                                                                              Found in wp-includes/js/dist/compose.js and 6 other locations - About 4 hrs to fix
                                                                                              wp-includes/js/dist/block-directory.js on lines 987..991
                                                                                              wp-includes/js/dist/commands.js on lines 1884..1888
                                                                                              wp-includes/js/dist/core-data.js on lines 1208..1212
                                                                                              wp-includes/js/dist/element.js on lines 1153..1157
                                                                                              wp-includes/js/dist/list-reusable-blocks.js on lines 335..339
                                                                                              wp-includes/js/dist/style-engine.js on lines 323..327

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

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

                                                                                              var SUPPORTED_LOCALE = {
                                                                                                  tr: {
                                                                                                      regexp: /\u0130|\u0049|\u0049\u0307/g,
                                                                                                      map: {
                                                                                                          Ä°: "\u0069",
                                                                                              Severity: Major
                                                                                              Found in wp-includes/js/dist/compose.js and 5 other locations - About 4 hrs to fix
                                                                                              wp-includes/js/dist/block-directory.js on lines 1086..1114
                                                                                              wp-includes/js/dist/core-data.js on lines 1307..1335
                                                                                              wp-includes/js/dist/element.js on lines 1252..1280
                                                                                              wp-includes/js/dist/list-reusable-blocks.js on lines 434..462
                                                                                              wp-includes/js/dist/style-engine.js on lines 422..450

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

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

                                                                                              function __extends(d, b) {
                                                                                                if (typeof b !== "function" && b !== null)
                                                                                                    throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
                                                                                                extendStatics(d, b);
                                                                                                function __() { this.constructor = d; }
                                                                                              Severity: Major
                                                                                              Found in wp-includes/js/dist/compose.js and 6 other locations - About 4 hrs to fix
                                                                                              wp-includes/js/dist/block-directory.js on lines 734..740
                                                                                              wp-includes/js/dist/commands.js on lines 1631..1637
                                                                                              wp-includes/js/dist/core-data.js on lines 955..961
                                                                                              wp-includes/js/dist/element.js on lines 900..906
                                                                                              wp-includes/js/dist/list-reusable-blocks.js on lines 82..88
                                                                                              wp-includes/js/dist/style-engine.js on lines 70..76

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

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

                                                                                              /******/     (() => {
                                                                                              /******/         // define __esModule on exports
                                                                                              /******/         __webpack_require__.r = (exports) => {
                                                                                              /******/             if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
                                                                                              /******/                 Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
                                                                                              Severity: Major
                                                                                              Found in wp-includes/js/dist/compose.js and 41 other locations - About 4 hrs to fix
                                                                                              wp-includes/js/dist/a11y.js on lines 37..45
                                                                                              wp-includes/js/dist/annotations.js on lines 25..33
                                                                                              wp-includes/js/dist/autop.js on lines 25..33
                                                                                              wp-includes/js/dist/blob.js on lines 25..33
                                                                                              wp-includes/js/dist/block-directory.js on lines 37..45
                                                                                              wp-includes/js/dist/block-serialization-default-parser.js on lines 25..33
                                                                                              wp-includes/js/dist/core-commands.js on lines 25..33
                                                                                              wp-includes/js/dist/core-data.js on lines 644..652
                                                                                              wp-includes/js/dist/customize-widgets.js on lines 207..215
                                                                                              wp-includes/js/dist/data-controls.js on lines 37..45
                                                                                              wp-includes/js/dist/data.js on lines 516..524
                                                                                              wp-includes/js/dist/dom.js on lines 37..45
                                                                                              wp-includes/js/dist/edit-post.js on lines 127..135
                                                                                              wp-includes/js/dist/edit-widgets.js on lines 127..135
                                                                                              wp-includes/js/dist/element.js on lines 71..79
                                                                                              wp-includes/js/dist/escape-html.js on lines 25..33
                                                                                              wp-includes/js/dist/hooks.js on lines 25..33
                                                                                              wp-includes/js/dist/html-entities.js on lines 25..33
                                                                                              wp-includes/js/dist/i18n.js on lines 300..308
                                                                                              wp-includes/js/dist/is-shallow-equal.js on lines 25..33
                                                                                              wp-includes/js/dist/keyboard-shortcuts.js on lines 25..33
                                                                                              wp-includes/js/dist/keycodes.js on lines 25..33
                                                                                              wp-includes/js/dist/list-reusable-blocks.js on lines 37..45
                                                                                              wp-includes/js/dist/media-utils.js on lines 37..45
                                                                                              wp-includes/js/dist/notices.js on lines 25..33
                                                                                              wp-includes/js/dist/nux.js on lines 37..45
                                                                                              wp-includes/js/dist/patterns.js on lines 25..33
                                                                                              wp-includes/js/dist/plugins.js on lines 37..45
                                                                                              wp-includes/js/dist/preferences-persistence.js on lines 37..45
                                                                                              wp-includes/js/dist/preferences.js on lines 37..45
                                                                                              wp-includes/js/dist/primitives.js on lines 127..135
                                                                                              wp-includes/js/dist/priority-queue.js on lines 280..288
                                                                                              wp-includes/js/dist/private-apis.js on lines 25..33
                                                                                              wp-includes/js/dist/reusable-blocks.js on lines 25..33
                                                                                              wp-includes/js/dist/router.js on lines 25..33
                                                                                              wp-includes/js/dist/style-engine.js on lines 25..33
                                                                                              wp-includes/js/dist/undo-manager.js on lines 69..77
                                                                                              wp-includes/js/dist/url.js on lines 549..557
                                                                                              wp-includes/js/dist/viewport.js on lines 25..33
                                                                                              wp-includes/js/dist/widgets.js on lines 127..135
                                                                                              wp-includes/js/dist/wordcount.js on lines 25..33

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

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

                                                                                              /******/     (() => {
                                                                                              /******/         // getDefaultExport function for compatibility with non-harmony modules
                                                                                              /******/         __webpack_require__.n = (module) => {
                                                                                              /******/             var getter = module && module.__esModule ?
                                                                                              /******/                 () => (module['default']) :
                                                                                              Severity: Major
                                                                                              Found in wp-includes/js/dist/compose.js and 22 other locations - About 3 hrs to fix
                                                                                              wp-includes/js/dist/a11y.js on lines 8..17
                                                                                              wp-includes/js/dist/block-directory.js on lines 8..17
                                                                                              wp-includes/js/dist/commands.js on lines 240..249
                                                                                              wp-includes/js/dist/core-data.js on lines 615..624
                                                                                              wp-includes/js/dist/customize-widgets.js on lines 178..187
                                                                                              wp-includes/js/dist/data-controls.js on lines 8..17
                                                                                              wp-includes/js/dist/data.js on lines 487..496
                                                                                              wp-includes/js/dist/dom.js on lines 8..17
                                                                                              wp-includes/js/dist/edit-post.js on lines 98..107
                                                                                              wp-includes/js/dist/edit-widgets.js on lines 98..107
                                                                                              wp-includes/js/dist/i18n.js on lines 271..280
                                                                                              wp-includes/js/dist/list-reusable-blocks.js on lines 8..17
                                                                                              wp-includes/js/dist/media-utils.js on lines 8..17
                                                                                              wp-includes/js/dist/nux.js on lines 8..17
                                                                                              wp-includes/js/dist/plugins.js on lines 8..17
                                                                                              wp-includes/js/dist/preferences-persistence.js on lines 8..17
                                                                                              wp-includes/js/dist/preferences.js on lines 8..17
                                                                                              wp-includes/js/dist/primitives.js on lines 98..107
                                                                                              wp-includes/js/dist/server-side-render.js on lines 112..121
                                                                                              wp-includes/js/dist/undo-manager.js on lines 40..49
                                                                                              wp-includes/js/dist/url.js on lines 520..529
                                                                                              wp-includes/js/dist/widgets.js on lines 98..107

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

                                                                                              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

                                                                                                  var _MAP = {
                                                                                                      8: 'backspace',
                                                                                                      9: 'tab',
                                                                                                      13: 'enter',
                                                                                                      16: 'shift',
                                                                                              Severity: Major
                                                                                              Found in wp-includes/js/dist/compose.js and 1 other location - About 3 hrs to fix
                                                                                              wp-includes/js/plupload/moxie.js on lines 7853..7876

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

                                                                                              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 pascalCaseTransform(input, index) {
                                                                                                  var firstChar = input.charAt(0);
                                                                                                  var lowerChars = input.substr(1).toLowerCase();
                                                                                                  if (index > 0 && firstChar >= "0" && firstChar <= "9") {
                                                                                                      return "_" + firstChar + lowerChars;
                                                                                              Severity: Major
                                                                                              Found in wp-includes/js/dist/compose.js and 2 other locations - About 3 hrs to fix
                                                                                              wp-includes/js/dist/block-directory.js on lines 1166..1173
                                                                                              wp-includes/js/dist/core-data.js on lines 1407..1414

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

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

                                                                                              function __runInitializers(thisArg, initializers, value) {
                                                                                                var useValue = arguments.length > 2;
                                                                                                for (var i = 0; i < initializers.length; i++) {
                                                                                                    value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
                                                                                                }
                                                                                              Severity: Major
                                                                                              Found in wp-includes/js/dist/compose.js and 6 other locations - About 3 hrs to fix
                                                                                              wp-includes/js/dist/block-directory.js on lines 804..810
                                                                                              wp-includes/js/dist/commands.js on lines 1701..1707
                                                                                              wp-includes/js/dist/core-data.js on lines 1025..1031
                                                                                              wp-includes/js/dist/element.js on lines 970..976
                                                                                              wp-includes/js/dist/list-reusable-blocks.js on lines 152..158
                                                                                              wp-includes/js/dist/style-engine.js on lines 140..146

                                                                                              Duplicated Code

                                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                              Tuning

                                                                                              This issue has a mass of 102.

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

                                                                                              function __importStar(mod) {
                                                                                                if (mod && mod.__esModule) return mod;
                                                                                                var result = {};
                                                                                                if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
                                                                                                __setModuleDefault(result, mod);
                                                                                              Severity: Major
                                                                                              Found in wp-includes/js/dist/compose.js and 6 other locations - About 3 hrs to fix
                                                                                              wp-includes/js/dist/block-directory.js on lines 975..981
                                                                                              wp-includes/js/dist/commands.js on lines 1872..1878
                                                                                              wp-includes/js/dist/core-data.js on lines 1196..1202
                                                                                              wp-includes/js/dist/element.js on lines 1141..1147
                                                                                              wp-includes/js/dist/list-reusable-blocks.js on lines 323..329
                                                                                              wp-includes/js/dist/style-engine.js on lines 311..317

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

                                                                                              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

                                                                                                  var _SHIFT_MAP = {
                                                                                                      '~': '`',
                                                                                                      '!': '1',
                                                                                                      '@': '2',
                                                                                                      '#': '3',
                                                                                              Severity: Major
                                                                                              Found in wp-includes/js/dist/compose.js and 1 other location - About 3 hrs to fix
                                                                                              wp-includes/js/jquery/jquery.hotkeys.js on lines 37..39

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

                                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                              Refactorings

                                                                                              Further Reading

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

                                                                                              function useDebounce(fn, wait, options) {
                                                                                                const debounced = useMemoOne(() => debounce(fn, wait !== null && wait !== void 0 ? wait : 0, options), [fn, wait, options]);
                                                                                                (0,external_wp_element_namespaceObject.useEffect)(() => () => debounced.cancel(), [debounced]);
                                                                                                return debounced;
                                                                                              }
                                                                                              Severity: Major
                                                                                              Found in wp-includes/js/dist/compose.js and 1 other location - About 3 hrs to fix
                                                                                              wp-includes/js/dist/compose.js on lines 5399..5403

                                                                                              Duplicated Code

                                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                              Tuning

                                                                                              This issue has a mass of 95.

                                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                              Refactorings

                                                                                              Further Reading

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

                                                                                              function useThrottle(fn, wait, options) {
                                                                                                const throttled = useMemoOne(() => throttle(fn, wait !== null && wait !== void 0 ? wait : 0, options), [fn, wait, options]);
                                                                                                (0,external_wp_element_namespaceObject.useEffect)(() => () => throttled.cancel(), [throttled]);
                                                                                                return throttled;
                                                                                              }
                                                                                              Severity: Major
                                                                                              Found in wp-includes/js/dist/compose.js and 1 other location - About 3 hrs to fix
                                                                                              wp-includes/js/dist/compose.js on lines 5335..5339

                                                                                              Duplicated Code

                                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                              Tuning

                                                                                              This issue has a mass of 95.

                                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                              Refactorings

                                                                                              Further Reading

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

                                                                                              function __setFunctionName(f, name, prefix) {
                                                                                                if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
                                                                                                return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
                                                                                              };
                                                                                              Severity: Major
                                                                                              Found in wp-includes/js/dist/compose.js and 6 other locations - About 2 hrs to fix
                                                                                              wp-includes/js/dist/block-directory.js on lines 816..819
                                                                                              wp-includes/js/dist/commands.js on lines 1713..1716
                                                                                              wp-includes/js/dist/core-data.js on lines 1037..1040
                                                                                              wp-includes/js/dist/element.js on lines 982..985
                                                                                              wp-includes/js/dist/list-reusable-blocks.js on lines 164..167
                                                                                              wp-includes/js/dist/style-engine.js on lines 152..155

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

                                                                                              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

                                                                                                const startDrag = (0,external_wp_element_namespaceObject.useCallback)(event => {
                                                                                                  if (eventsRef.current.onDragStart) {
                                                                                                    eventsRef.current.onDragStart(event);
                                                                                                  }
                                                                                                  document.addEventListener('mousemove', onMouseMove);
                                                                                              Severity: Major
                                                                                              Found in wp-includes/js/dist/compose.js and 1 other location - About 2 hrs to fix
                                                                                              wp-includes/js/dist/compose.js on lines 4527..4534

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

                                                                                              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

                                                                                                const endDrag = (0,external_wp_element_namespaceObject.useCallback)(event => {
                                                                                                  if (eventsRef.current.onDragEnd) {
                                                                                                    eventsRef.current.onDragEnd(event);
                                                                                                  }
                                                                                                  document.removeEventListener('mousemove', onMouseMove);
                                                                                              Severity: Major
                                                                                              Found in wp-includes/js/dist/compose.js and 1 other location - About 2 hrs to fix
                                                                                              wp-includes/js/dist/compose.js on lines 4536..4543

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

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

                                                                                              function localeLowerCase(str, locale) {
                                                                                                  var lang = SUPPORTED_LOCALE[locale.toLowerCase()];
                                                                                                  if (lang)
                                                                                                      return lowerCase(str.replace(lang.regexp, function (m) { return lang.map[m]; }));
                                                                                                  return lowerCase(str);
                                                                                              Severity: Major
                                                                                              Found in wp-includes/js/dist/compose.js and 5 other locations - About 2 hrs to fix
                                                                                              wp-includes/js/dist/block-directory.js on lines 1118..1123
                                                                                              wp-includes/js/dist/core-data.js on lines 1339..1344
                                                                                              wp-includes/js/dist/element.js on lines 1284..1289
                                                                                              wp-includes/js/dist/list-reusable-blocks.js on lines 466..471
                                                                                              wp-includes/js/dist/style-engine.js on lines 454..459

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

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

                                                                                              function __classPrivateFieldIn(state, receiver) {
                                                                                                if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object");
                                                                                                return typeof state === "function" ? receiver === state : state.has(receiver);
                                                                                              }
                                                                                              Severity: Major
                                                                                              Found in wp-includes/js/dist/compose.js and 6 other locations - About 1 hr to fix
                                                                                              wp-includes/js/dist/block-directory.js on lines 1000..1003
                                                                                              wp-includes/js/dist/commands.js on lines 1897..1900
                                                                                              wp-includes/js/dist/core-data.js on lines 1221..1224
                                                                                              wp-includes/js/dist/element.js on lines 1166..1169
                                                                                              wp-includes/js/dist/list-reusable-blocks.js on lines 348..351
                                                                                              wp-includes/js/dist/style-engine.js on lines 336..339

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

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

                                                                                              var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
                                                                                                var e = new Error(message);
                                                                                                return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
                                                                                              };
                                                                                              Severity: Major
                                                                                              Found in wp-includes/js/dist/compose.js and 6 other locations - About 1 hr to fix
                                                                                              wp-includes/js/dist/block-directory.js on lines 1026..1029
                                                                                              wp-includes/js/dist/commands.js on lines 1923..1926
                                                                                              wp-includes/js/dist/core-data.js on lines 1247..1250
                                                                                              wp-includes/js/dist/element.js on lines 1192..1195
                                                                                              wp-includes/js/dist/list-reusable-blocks.js on lines 374..377
                                                                                              wp-includes/js/dist/style-engine.js on lines 362..365

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

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

                                                                                              function __spread() {
                                                                                                for (var ar = [], i = 0; i < arguments.length; i++)
                                                                                                    ar = ar.concat(__read(arguments[i]));
                                                                                                return ar;
                                                                                              }
                                                                                              Severity: Major
                                                                                              Found in wp-includes/js/dist/compose.js and 6 other locations - About 1 hr to fix
                                                                                              wp-includes/js/dist/block-directory.js on lines 909..913
                                                                                              wp-includes/js/dist/commands.js on lines 1806..1810
                                                                                              wp-includes/js/dist/core-data.js on lines 1130..1134
                                                                                              wp-includes/js/dist/element.js on lines 1075..1079
                                                                                              wp-includes/js/dist/list-reusable-blocks.js on lines 257..261
                                                                                              wp-includes/js/dist/style-engine.js on lines 245..249

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

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

                                                                                              var __setModuleDefault = Object.create ? (function(o, v) {
                                                                                                Object.defineProperty(o, "default", { enumerable: true, value: v });
                                                                                              }) : function(o, v) {
                                                                                                o["default"] = v;
                                                                                              };
                                                                                              Severity: Major
                                                                                              Found in wp-includes/js/dist/compose.js and 6 other locations - About 1 hr to fix
                                                                                              wp-includes/js/dist/block-directory.js on lines 969..973
                                                                                              wp-includes/js/dist/commands.js on lines 1866..1870
                                                                                              wp-includes/js/dist/core-data.js on lines 1190..1194
                                                                                              wp-includes/js/dist/element.js on lines 1135..1139
                                                                                              wp-includes/js/dist/list-reusable-blocks.js on lines 317..321
                                                                                              wp-includes/js/dist/style-engine.js on lines 305..309

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

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

                                                                                              function replace(input, re, value) {
                                                                                                  if (re instanceof RegExp)
                                                                                                      return input.replace(re, value);
                                                                                                  return re.reduce(function (input, re) { return input.replace(re, value); }, input);
                                                                                              }
                                                                                              Severity: Major
                                                                                              Found in wp-includes/js/dist/compose.js and 5 other locations - About 1 hr to fix
                                                                                              wp-includes/js/dist/block-directory.js on lines 1157..1161
                                                                                              wp-includes/js/dist/core-data.js on lines 1378..1382
                                                                                              wp-includes/js/dist/element.js on lines 1323..1327
                                                                                              wp-includes/js/dist/list-reusable-blocks.js on lines 505..509
                                                                                              wp-includes/js/dist/style-engine.js on lines 493..497

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

                                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                              Refactorings

                                                                                              Further Reading

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

                                                                                                  case 'UNDO':
                                                                                                    {
                                                                                                      const undoRecord = state.manager.undo();
                                                                                                      if (undoRecord) {
                                                                                                        return {
                                                                                              Severity: Major
                                                                                              Found in wp-includes/js/dist/compose.js and 1 other location - About 1 hr to fix
                                                                                              wp-includes/js/dist/compose.js on lines 4760..4770

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

                                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                              Refactorings

                                                                                              Further Reading

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

                                                                                                  case 'REDO':
                                                                                                    {
                                                                                                      const redoRecord = state.manager.redo();
                                                                                                      if (redoRecord) {
                                                                                                        return {
                                                                                              Severity: Major
                                                                                              Found in wp-includes/js/dist/compose.js and 1 other location - About 1 hr to fix
                                                                                              wp-includes/js/dist/compose.js on lines 4749..4759

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

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

                                                                                              function __exportStar(m, o) {
                                                                                                for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
                                                                                              }
                                                                                              Severity: Major
                                                                                              Found in wp-includes/js/dist/compose.js and 6 other locations - About 1 hr to fix
                                                                                              wp-includes/js/dist/block-directory.js on lines 875..877
                                                                                              wp-includes/js/dist/commands.js on lines 1772..1774
                                                                                              wp-includes/js/dist/core-data.js on lines 1096..1098
                                                                                              wp-includes/js/dist/element.js on lines 1041..1043
                                                                                              wp-includes/js/dist/list-reusable-blocks.js on lines 223..225
                                                                                              wp-includes/js/dist/style-engine.js on lines 211..213

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

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

                                                                                              /******/     (() => {
                                                                                              /******/         __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
                                                                                              /******/     })();
                                                                                              Severity: Major
                                                                                              Found in wp-includes/js/dist/compose.js and 42 other locations - About 1 hr to fix
                                                                                              wp-includes/js/dist/a11y.js on lines 32..34
                                                                                              wp-includes/js/dist/annotations.js on lines 20..22
                                                                                              wp-includes/js/dist/autop.js on lines 20..22
                                                                                              wp-includes/js/dist/blob.js on lines 20..22
                                                                                              wp-includes/js/dist/block-directory.js on lines 32..34
                                                                                              wp-includes/js/dist/block-serialization-default-parser.js on lines 20..22
                                                                                              wp-includes/js/dist/commands.js on lines 264..266
                                                                                              wp-includes/js/dist/core-commands.js on lines 20..22
                                                                                              wp-includes/js/dist/core-data.js on lines 639..641
                                                                                              wp-includes/js/dist/customize-widgets.js on lines 202..204
                                                                                              wp-includes/js/dist/data-controls.js on lines 32..34
                                                                                              wp-includes/js/dist/data.js on lines 511..513
                                                                                              wp-includes/js/dist/dom.js on lines 32..34
                                                                                              wp-includes/js/dist/edit-post.js on lines 122..124
                                                                                              wp-includes/js/dist/edit-widgets.js on lines 122..124
                                                                                              wp-includes/js/dist/element.js on lines 66..68
                                                                                              wp-includes/js/dist/escape-html.js on lines 20..22
                                                                                              wp-includes/js/dist/hooks.js on lines 20..22
                                                                                              wp-includes/js/dist/html-entities.js on lines 20..22
                                                                                              wp-includes/js/dist/i18n.js on lines 295..297
                                                                                              wp-includes/js/dist/is-shallow-equal.js on lines 20..22
                                                                                              wp-includes/js/dist/keyboard-shortcuts.js on lines 20..22
                                                                                              wp-includes/js/dist/keycodes.js on lines 20..22
                                                                                              wp-includes/js/dist/list-reusable-blocks.js on lines 32..34
                                                                                              wp-includes/js/dist/media-utils.js on lines 32..34
                                                                                              wp-includes/js/dist/notices.js on lines 20..22
                                                                                              wp-includes/js/dist/nux.js on lines 32..34
                                                                                              wp-includes/js/dist/patterns.js on lines 20..22
                                                                                              wp-includes/js/dist/plugins.js on lines 32..34
                                                                                              wp-includes/js/dist/preferences-persistence.js on lines 32..34
                                                                                              wp-includes/js/dist/preferences.js on lines 32..34
                                                                                              wp-includes/js/dist/primitives.js on lines 122..124
                                                                                              wp-includes/js/dist/priority-queue.js on lines 275..277
                                                                                              wp-includes/js/dist/private-apis.js on lines 20..22
                                                                                              wp-includes/js/dist/reusable-blocks.js on lines 20..22
                                                                                              wp-includes/js/dist/router.js on lines 20..22
                                                                                              wp-includes/js/dist/style-engine.js on lines 20..22
                                                                                              wp-includes/js/dist/undo-manager.js on lines 64..66
                                                                                              wp-includes/js/dist/url.js on lines 544..546
                                                                                              wp-includes/js/dist/viewport.js on lines 20..22
                                                                                              wp-includes/js/dist/widgets.js on lines 122..124
                                                                                              wp-includes/js/dist/wordcount.js on lines 20..22

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

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

                                                                                              function __makeTemplateObject(cooked, raw) {
                                                                                                if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
                                                                                                return cooked;
                                                                                              };
                                                                                              Severity: Major
                                                                                              Found in wp-includes/js/dist/compose.js and 6 other locations - About 1 hr to fix
                                                                                              wp-includes/js/dist/block-directory.js on lines 964..967
                                                                                              wp-includes/js/dist/commands.js on lines 1861..1864
                                                                                              wp-includes/js/dist/core-data.js on lines 1185..1188
                                                                                              wp-includes/js/dist/element.js on lines 1130..1133
                                                                                              wp-includes/js/dist/list-reusable-blocks.js on lines 312..315
                                                                                              wp-includes/js/dist/style-engine.js on lines 300..303

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

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

                                                                                              function pascalCase(input, options) {
                                                                                                  if (options === void 0) { options = {}; }
                                                                                                  return noCase(input, __assign({ delimiter: "", transform: pascalCaseTransform }, options));
                                                                                              }
                                                                                              Severity: Major
                                                                                              Found in wp-includes/js/dist/compose.js and 3 other locations - About 1 hr to fix
                                                                                              wp-includes/js/dist/block-directory.js on lines 1177..1180
                                                                                              wp-includes/js/dist/core-data.js on lines 1399..1402
                                                                                              wp-includes/js/dist/core-data.js on lines 1418..1421

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

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

                                                                                              function __metadata(metadataKey, metadataValue) {
                                                                                                if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
                                                                                              }
                                                                                              Severity: Major
                                                                                              Found in wp-includes/js/dist/compose.js and 6 other locations - About 35 mins to fix
                                                                                              wp-includes/js/dist/block-directory.js on lines 821..823
                                                                                              wp-includes/js/dist/commands.js on lines 1718..1720
                                                                                              wp-includes/js/dist/core-data.js on lines 1042..1044
                                                                                              wp-includes/js/dist/element.js on lines 987..989
                                                                                              wp-includes/js/dist/list-reusable-blocks.js on lines 169..171
                                                                                              wp-includes/js/dist/style-engine.js on lines 157..159

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

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

                                                                                              function pascalCaseTransformMerge(input) {
                                                                                                  return input.charAt(0).toUpperCase() + input.slice(1).toLowerCase();
                                                                                              }
                                                                                              Severity: Minor
                                                                                              Found in wp-includes/js/dist/compose.js and 2 other locations - About 35 mins to fix
                                                                                              wp-includes/js/dist/block-directory.js on lines 1174..1176
                                                                                              wp-includes/js/dist/core-data.js on lines 1415..1417

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

                                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                              Refactorings

                                                                                              Further Reading

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

                                                                                                  function _preventDefault(e) {
                                                                                                      if (e.preventDefault) {
                                                                                                          e.preventDefault();
                                                                                                          return;
                                                                                                      }
                                                                                              Severity: Minor
                                                                                              Found in wp-includes/js/dist/compose.js and 1 other location - About 35 mins to fix
                                                                                              wp-includes/js/dist/compose.js on lines 1370..1377

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

                                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                              Refactorings

                                                                                              Further Reading

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

                                                                                                  function _stopPropagation(e) {
                                                                                                      if (e.stopPropagation) {
                                                                                                          e.stopPropagation();
                                                                                                          return;
                                                                                                      }
                                                                                              Severity: Minor
                                                                                              Found in wp-includes/js/dist/compose.js and 1 other location - About 35 mins to fix
                                                                                              wp-includes/js/dist/compose.js on lines 1355..1362

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

                                                                                              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

                                                                                                    componentDidMount() {
                                                                                                      Object.keys(eventTypesToHandlers).forEach(eventType => {
                                                                                                        with_global_events_listener.add(eventType, this);
                                                                                                      });
                                                                                                    }
                                                                                              Severity: Minor
                                                                                              Found in wp-includes/js/dist/compose.js and 1 other location - About 30 mins to fix
                                                                                              wp-includes/js/dist/compose.js on lines 3392..3396

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

                                                                                              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

                                                                                                    componentWillUnmount() {
                                                                                                      Object.keys(eventTypesToHandlers).forEach(eventType => {
                                                                                                        with_global_events_listener.remove(eventType, this);
                                                                                                      });
                                                                                                    }
                                                                                              Severity: Minor
                                                                                              Found in wp-includes/js/dist/compose.js and 1 other location - About 30 mins to fix
                                                                                              wp-includes/js/dist/compose.js on lines 3387..3391

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

                                                                                              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