WordPress/WordPress

View on GitHub
wp-includes/js/dist/customize-widgets.js

Summary

Maintainability
F
1 mo
Test Coverage

File customize-widgets.js has 1761 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/******/ (() => { // webpackBootstrap
/******/     "use strict";
/******/     var __webpack_modules__ = ({

/***/ 7734:
Severity: Major
Found in wp-includes/js/dist/customize-widgets.js - About 4 days to fix

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

    function getInserterOuterSection() {
      const {
        wp: {
          customize
        }
    Severity: Major
    Found in wp-includes/js/dist/customize-widgets.js - About 3 hrs to fix

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

      function getInspectorSection() {
        const {
          wp: {
            customize
          }
      Severity: Major
      Found in wp-includes/js/dist/customize-widgets.js - About 2 hrs to fix

        Function getSidebarSection has 59 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function getSidebarSection() {
          const {
            wp: {
              customize
            }
        Severity: Major
        Found in wp-includes/js/dist/customize-widgets.js - About 2 hrs to fix

          Function useSidebarBlockEditor has 55 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function useSidebarBlockEditor(sidebar) {
            const [blocks, setBlocks] = (0,external_wp_element_namespaceObject.useState)(() => widgetsToBlocks(sidebar.getWidgets()));
            (0,external_wp_element_namespaceObject.useEffect)(() => {
              return sidebar.subscribe((prevWidgets, nextWidgets) => {
                setBlocks(prevBlocks => {
          Severity: Major
          Found in wp-includes/js/dist/customize-widgets.js - About 2 hrs to fix

            Function MoreMenu has 53 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function MoreMenu() {
              const [isKeyboardShortcutsModalActive, setIsKeyboardShortcutsModalVisible] = (0,external_wp_element_namespaceObject.useState)(false);
              const toggleKeyboardShortcutsModal = () => setIsKeyboardShortcutsModalVisible(!isKeyboardShortcutsModalActive);
              (0,external_wp_keyboardShortcuts_namespaceObject.useShortcut)('core/customize-widgets/keyboard-shortcuts', toggleKeyboardShortcutsModal);
              return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
            Severity: Major
            Found in wp-includes/js/dist/customize-widgets.js - About 2 hrs to fix

              Function 7734 has 50 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              /***/ ((module) => {
              
              
              
              // do not edit .js files directly - edit src/index.jst
              Severity: Minor
              Found in wp-includes/js/dist/customize-widgets.js - About 2 hrs to fix

                Function equal has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                module.exports = function equal(a, b) {
                  if (a === b) return true;
                
                  if (a && b && typeof a == 'object' && typeof b == 'object') {
                    if (a.constructor !== b.constructor) return false;
                Severity: Minor
                Found in wp-includes/js/dist/customize-widgets.js - About 1 hr to fix

                  Function blockToWidget has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function blockToWidget(block, existingWidget = null) {
                    let widget;
                    const isValidLegacyWidgetBlock = block.name === 'core/legacy-widget' && (block.attributes.id || block.attributes.instance);
                    if (isValidLegacyWidgetBlock) {
                      if (block.attributes.id) {
                  Severity: Minor
                  Found in wp-includes/js/dist/customize-widgets.js - About 1 hr to fix

                    Function KeyboardShortcutsRegister has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function KeyboardShortcutsRegister() {
                      const {
                        registerShortcut,
                        unregisterShortcut
                      } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_keyboardShortcuts_namespaceObject.store);
                    Severity: Minor
                    Found in wp-includes/js/dist/customize-widgets.js - About 1 hr to fix

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

                      const withMoveToSidebarToolbarItem = (0,external_wp_compose_namespaceObject.createHigherOrderComponent)(BlockEdit => props => {
                        let widgetId = (0,external_wp_widgets_namespaceObject.getWidgetIdFromBlock)(props);
                        const sidebarControls = useSidebarControls();
                        const activeSidebarControl = useActiveSidebarControl();
                        const hasMultipleSidebars = sidebarControls?.length > 1;
                      Severity: Minor
                      Found in wp-includes/js/dist/customize-widgets.js - About 1 hr to fix

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

                        function useClearSelectedBlock(sidebarControl, popoverRef) {
                          const {
                            hasSelectedBlock,
                            hasMultiSelection
                          } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store);
                        Severity: Minor
                        Found in wp-includes/js/dist/customize-widgets.js - About 1 hr to fix

                          Consider simplifying this complex logical expression.
                          Open

                                  if (
                                  // 1. Make sure there are blocks being selected.
                                  (hasSelectedBlock() || hasMultiSelection()) &&
                                  // 2. The element should exist in the DOM (not deleted).
                                  element && ownerDocument.contains(element) &&
                          Severity: Critical
                          Found in wp-includes/js/dist/customize-widgets.js - About 1 hr to fix

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

                            function getSidebarControl() {
                              const {
                                wp: {
                                  customize
                                }
                            Severity: Minor
                            Found in wp-includes/js/dist/customize-widgets.js - About 1 hr to fix

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

                                const onChangeBlocks = (0,external_wp_element_namespaceObject.useCallback)(nextBlocks => {
                                  setBlocks(prevBlocks => {
                                    if (external_wp_isShallowEqual_default()(prevBlocks, nextBlocks)) {
                                      return prevBlocks;
                                    }
                              Severity: Minor
                              Found in wp-includes/js/dist/customize-widgets.js - About 1 hr to fix

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

                                    onChangeExpanded(expanded, _args) {
                                      const controls = this.controls();
                                      const args = {
                                        ..._args,
                                        completeCallback() {
                                Severity: Minor
                                Found in wp-includes/js/dist/customize-widgets.js - About 1 hr to fix

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

                                  function initialize(editorName, blockEditorSettings) {
                                    (0,external_wp_data_namespaceObject.dispatch)(external_wp_preferences_namespaceObject.store).setDefaults('core/customize-widgets', {
                                      fixedToolbar: false,
                                      welcomeGuide: true
                                    });
                                  Severity: Minor
                                  Found in wp-includes/js/dist/customize-widgets.js - About 1 hr to fix

                                    Consider simplifying this complex logical expression.
                                    Open

                                    function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f)}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}/* harmony default export */ const dist_clsx = (clsx);
                                    Severity: Major
                                    Found in wp-includes/js/dist/customize-widgets.js - About 40 mins to fix

                                      Avoid too many return statements within this function.
                                      Open

                                          return true;
                                      Severity: Major
                                      Found in wp-includes/js/dist/customize-widgets.js - About 30 mins to fix

                                        Avoid too many return statements within this function.
                                        Open

                                                if (!equal(i[1], b.get(i[0]))) return false;
                                        Severity: Major
                                        Found in wp-includes/js/dist/customize-widgets.js - About 30 mins to fix

                                          Avoid too many return statements within this function.
                                          Open

                                                return true;
                                          Severity: Major
                                          Found in wp-includes/js/dist/customize-widgets.js - About 30 mins to fix

                                            Avoid too many return statements within this function.
                                            Open

                                                if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
                                            Severity: Major
                                            Found in wp-includes/js/dist/customize-widgets.js - About 30 mins to fix

                                              Avoid too many return statements within this function.
                                              Open

                                                  if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
                                              Severity: Major
                                              Found in wp-includes/js/dist/customize-widgets.js - About 30 mins to fix

                                                Avoid too many return statements within this function.
                                                Open

                                                        if (!b.has(i[0])) return false;
                                                Severity: Major
                                                Found in wp-includes/js/dist/customize-widgets.js - About 30 mins to fix

                                                  Avoid too many return statements within this function.
                                                  Open

                                                      if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
                                                  Severity: Major
                                                  Found in wp-includes/js/dist/customize-widgets.js - About 30 mins to fix

                                                    Avoid too many return statements within this function.
                                                    Open

                                                        if (length !== Object.keys(b).length) return false;
                                                    Severity: Major
                                                    Found in wp-includes/js/dist/customize-widgets.js - About 30 mins to fix

                                                      Avoid too many return statements within this function.
                                                      Open

                                                            if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
                                                      Severity: Major
                                                      Found in wp-includes/js/dist/customize-widgets.js - About 30 mins to fix

                                                        Avoid too many return statements within this function.
                                                        Open

                                                              if (!equal(a[key], b[key])) return false;
                                                        Severity: Major
                                                        Found in wp-includes/js/dist/customize-widgets.js - About 30 mins to fix

                                                          Avoid too many return statements within this function.
                                                          Open

                                                                  if (!b.has(i[0])) return false;
                                                          Severity: Major
                                                          Found in wp-includes/js/dist/customize-widgets.js - About 30 mins to fix

                                                            Avoid too many return statements within this function.
                                                            Open

                                                                  if (length != b.length) return false;
                                                            Severity: Major
                                                            Found in wp-includes/js/dist/customize-widgets.js - About 30 mins to fix

                                                              Avoid too many return statements within this function.
                                                              Open

                                                                return a!==a && b!==b;
                                                              Severity: Major
                                                              Found in wp-includes/js/dist/customize-widgets.js - About 30 mins to fix

                                                                Avoid too many return statements within this function.
                                                                Open

                                                                      return true;
                                                                Severity: Major
                                                                Found in wp-includes/js/dist/customize-widgets.js - About 30 mins to fix

                                                                  Avoid too many return statements within this function.
                                                                  Open

                                                                          if (a[i] !== b[i]) return false;
                                                                  Severity: Major
                                                                  Found in wp-includes/js/dist/customize-widgets.js - About 30 mins to fix

                                                                    Avoid too many return statements within this function.
                                                                    Open

                                                                          if (a.size !== b.size) return false;
                                                                    Severity: Major
                                                                    Found in wp-includes/js/dist/customize-widgets.js - About 30 mins to fix

                                                                      Avoid too many return statements within this function.
                                                                      Open

                                                                            return true;
                                                                      Severity: Major
                                                                      Found in wp-includes/js/dist/customize-widgets.js - About 30 mins to fix

                                                                        Avoid too many return statements within this function.
                                                                        Open

                                                                              if (a.size !== b.size) return false;
                                                                        Severity: Major
                                                                        Found in wp-includes/js/dist/customize-widgets.js - About 30 mins to fix

                                                                          Avoid too many return statements within this function.
                                                                          Open

                                                                                return true;
                                                                          Severity: Major
                                                                          Found in wp-includes/js/dist/customize-widgets.js - About 30 mins to fix

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

                                                                            /******/     var __webpack_modules__ = ({
                                                                            
                                                                            /***/ 7734:
                                                                            /***/ ((module) => {
                                                                            
                                                                            
                                                                            Severity: Major
                                                                            Found in wp-includes/js/dist/customize-widgets.js and 1 other location - About 4 days to fix
                                                                            wp-includes/js/dist/server-side-render.js on lines 3..84

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

                                                                            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 textFormattingShortcuts = [{
                                                                              keyCombination: {
                                                                                modifier: 'primary',
                                                                                character: 'b'
                                                                              },
                                                                            Severity: Major
                                                                            Found in wp-includes/js/dist/customize-widgets.js and 1 other location - About 2 days to fix
                                                                            wp-includes/js/dist/edit-widgets.js on lines 3742..3811

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

                                                                            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 Shortcut({
                                                                              description,
                                                                              keyCombination,
                                                                              aliases = [],
                                                                              ariaLabel
                                                                            Severity: Major
                                                                            Found in wp-includes/js/dist/customize-widgets.js and 1 other location - About 7 hrs to fix
                                                                            wp-includes/js/dist/edit-widgets.js on lines 3845..3866

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

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

                                                                            function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f)}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}/* harmony default export */ const dist_clsx = (clsx);
                                                                            Severity: Major
                                                                            Found in wp-includes/js/dist/customize-widgets.js and 5 other locations - About 7 hrs to fix
                                                                            wp-includes/js/dist/commands.js on lines 3140..3140
                                                                            wp-includes/js/dist/edit-post.js on lines 161..161
                                                                            wp-includes/js/dist/edit-widgets.js on lines 285..285
                                                                            wp-includes/js/dist/primitives.js on lines 59..59
                                                                            wp-includes/js/dist/widgets.js on lines 102..102

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

                                                                            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 DynamicShortcut({
                                                                              name
                                                                            }) {
                                                                              const {
                                                                                keyCombination,
                                                                            Severity: Major
                                                                            Found in wp-includes/js/dist/customize-widgets.js and 1 other location - About 6 hrs to fix
                                                                            wp-includes/js/dist/edit-widgets.js on lines 3881..3908

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

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

                                                                            /******/     function __webpack_require__(moduleId) {
                                                                            /******/         // Check if module is in cache
                                                                            /******/         var cachedModule = __webpack_module_cache__[moduleId];
                                                                            /******/         if (cachedModule !== undefined) {
                                                                            /******/             return cachedModule.exports;
                                                                            Severity: Major
                                                                            Found in wp-includes/js/dist/customize-widgets.js and 10 other locations - About 5 hrs to fix
                                                                            wp-includes/js/dist/commands.js on lines 152..170
                                                                            wp-includes/js/dist/core-data.js on lines 593..611
                                                                            wp-includes/js/dist/data.js on lines 465..483
                                                                            wp-includes/js/dist/element.js on lines 32..50
                                                                            wp-includes/js/dist/i18n.js on lines 249..267
                                                                            wp-includes/js/dist/priority-queue.js on lines 229..247
                                                                            wp-includes/js/dist/redux-routine.js on lines 660..678
                                                                            wp-includes/js/dist/server-side-render.js on lines 90..108
                                                                            wp-includes/js/dist/undo-manager.js on lines 18..36
                                                                            wp-includes/js/dist/url.js on lines 498..516

                                                                            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

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

                                                                            const ShortcutList = ({
                                                                              shortcuts
                                                                            }) =>
                                                                            /*#__PURE__*/
                                                                            /*
                                                                            Severity: Major
                                                                            Found in wp-includes/js/dist/customize-widgets.js and 1 other location - About 5 hrs to fix
                                                                            wp-includes/js/dist/edit-widgets.js on lines 3933..3954

                                                                            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

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

                                                                                    children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuGroup, {
                                                                                      label: (0,external_wp_i18n_namespaceObject._x)('View', 'noun'),
                                                                                      children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_preferences_namespaceObject.PreferenceToggleMenuItem, {
                                                                                        scope: "core/customize-widgets",
                                                                                        name: "fixedToolbar",
                                                                            Severity: Major
                                                                            Found in wp-includes/js/dist/customize-widgets.js and 1 other location - About 5 hrs to fix
                                                                            wp-includes/js/dist/edit-widgets.js on lines 4082..4092

                                                                            Duplicated Code

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

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

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

                                                                            Tuning

                                                                            This issue has a mass of 135.

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

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

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

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

                                                                            Refactorings

                                                                            Further Reading

                                                                            Similar blocks of code found in 22 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/customize-widgets.js and 21 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 186..195
                                                                            wp-includes/js/dist/compose.js on lines 2245..2254
                                                                            wp-includes/js/dist/core-data.js on lines 627..636
                                                                            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 20..29
                                                                            wp-includes/js/dist/edit-widgets.js on lines 20..29
                                                                            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/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 20..29

                                                                            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

                                                                            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/customize-widgets.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/compose.js on lines 2262..2270
                                                                            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/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 37..45
                                                                            wp-includes/js/dist/edit-widgets.js on lines 37..45
                                                                            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 25..33
                                                                            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 37..45
                                                                            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 2 locations. Consider refactoring.
                                                                            Open

                                                                                      }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.MenuItem, {
                                                                                        role: "menuitem",
                                                                                        icon: library_external,
                                                                                        href: (0,external_wp_i18n_namespaceObject.__)('https://wordpress.org/documentation/article/block-based-widgets-editor/'),
                                                                                        target: "_blank",
                                                                            Severity: Major
                                                                            Found in wp-includes/js/dist/customize-widgets.js and 1 other location - About 4 hrs to fix
                                                                            wp-includes/js/dist/edit-widgets.js on lines 4104..4115

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

                                                                            const ShortcutCategorySection = ({
                                                                              title,
                                                                              categoryName,
                                                                              additionalShortcuts = []
                                                                            }) => {
                                                                            Severity: Major
                                                                            Found in wp-includes/js/dist/customize-widgets.js and 1 other location - About 4 hrs to fix
                                                                            wp-includes/js/dist/edit-widgets.js on lines 3968..3980

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

                                                                            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 22 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/customize-widgets.js and 21 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 174..183
                                                                            wp-includes/js/dist/compose.js on lines 2233..2242
                                                                            wp-includes/js/dist/core-data.js on lines 615..624
                                                                            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 8..17
                                                                            wp-includes/js/dist/edit-widgets.js on lines 8..17
                                                                            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/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 8..17

                                                                            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

                                                                            const ShortcutSection = ({
                                                                              title,
                                                                              shortcuts,
                                                                              className
                                                                            }) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("section", {
                                                                            Severity: Major
                                                                            Found in wp-includes/js/dist/customize-widgets.js and 1 other location - About 3 hrs to fix
                                                                            wp-includes/js/dist/edit-widgets.js on lines 3955..3967

                                                                            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

                                                                              const coreBlocks = (0,external_wp_blockLibrary_namespaceObject.__experimentalGetCoreBlocks)().filter(block => {
                                                                                return !(DISABLED_BLOCKS.includes(block.name) || block.name.startsWith('core/post') || block.name.startsWith('core/query') || block.name.startsWith('core/site') || block.name.startsWith('core/navigation'));
                                                                              });
                                                                            Severity: Major
                                                                            Found in wp-includes/js/dist/customize-widgets.js and 1 other location - About 3 hrs to fix
                                                                            wp-includes/js/dist/edit-widgets.js on lines 4919..4921

                                                                            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

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

                                                                                }), !isEntirelyBlockWidgets && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("p", {
                                                                                  className: "customize-widgets-welcome-guide__more-info",
                                                                                  children: [(0,external_wp_i18n_namespaceObject.__)('Want to stick with the old widgets?'), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("br", {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ExternalLink, {
                                                                                    href: (0,external_wp_i18n_namespaceObject.__)('https://wordpress.org/plugins/classic-widgets/'),
                                                                                    children: (0,external_wp_i18n_namespaceObject.__)('Get the Classic Widgets plugin.')
                                                                            Severity: Major
                                                                            Found in wp-includes/js/dist/customize-widgets.js and 1 other location - About 3 hrs to fix
                                                                            wp-includes/js/dist/customize-widgets.js on lines 1535..1541

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

                                                                            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

                                                                                }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("p", {
                                                                                  className: "customize-widgets-welcome-guide__more-info",
                                                                                  children: [(0,external_wp_i18n_namespaceObject.__)('New to the block editor?'), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("br", {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ExternalLink, {
                                                                                    href: (0,external_wp_i18n_namespaceObject.__)('https://wordpress.org/documentation/article/wordpress-block-editor/'),
                                                                                    children: (0,external_wp_i18n_namespaceObject.__)("Here's a detailed guide.")
                                                                            Severity: Major
                                                                            Found in wp-includes/js/dist/customize-widgets.js and 1 other location - About 3 hrs to fix
                                                                            wp-includes/js/dist/customize-widgets.js on lines 1529..1535

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

                                                                            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

                                                                                registerShortcut({
                                                                                  name: 'core/customize-widgets/redo',
                                                                                  category: 'global',
                                                                                  description: (0,external_wp_i18n_namespaceObject.__)('Redo your last undo.'),
                                                                                  keyCombination: {
                                                                            Severity: Major
                                                                            Found in wp-includes/js/dist/customize-widgets.js and 1 other location - About 2 hrs to fix
                                                                            wp-includes/js/dist/edit-widgets.js on lines 2911..2927

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

                                                                            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

                                                                                }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ShortcutCategorySection, {
                                                                                  title: (0,external_wp_i18n_namespaceObject.__)('Block shortcuts'),
                                                                                  categoryName: "block",
                                                                                  additionalShortcuts: [{
                                                                                    keyCombination: {
                                                                            Severity: Major
                                                                            Found in wp-includes/js/dist/customize-widgets.js and 1 other location - About 2 hrs to fix
                                                                            wp-includes/js/dist/edit-widgets.js on lines 4004..4015

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

                                                                            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 CopyButton({
                                                                              text,
                                                                              children
                                                                            }) {
                                                                              const ref = (0,external_wp_compose_namespaceObject.useCopyToClipboard)(text);
                                                                            Severity: Major
                                                                            Found in wp-includes/js/dist/customize-widgets.js and 1 other location - About 2 hrs to fix
                                                                            wp-includes/js/dist/edit-widgets.js on lines 2802..2812

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

                                                                            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

                                                                                children: (Array.isArray(shortcut) ? shortcut : [shortcut]).map((character, index) => {
                                                                                  if (character === '+') {
                                                                                    return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_element_namespaceObject.Fragment, {
                                                                                      children: character
                                                                                    }, index);
                                                                            Severity: Major
                                                                            Found in wp-includes/js/dist/customize-widgets.js and 1 other location - About 2 hrs to fix
                                                                            wp-includes/js/dist/edit-widgets.js on lines 3832..3842

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

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

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

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

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

                                                                            Refactorings

                                                                            Further Reading

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

                                                                                if (hasUploadPermissions) {
                                                                                  mediaUploadBlockEditor = ({
                                                                                    onError,
                                                                                    ...argumentsObject
                                                                                  }) => {
                                                                            Severity: Major
                                                                            Found in wp-includes/js/dist/customize-widgets.js and 1 other location - About 1 hr to fix
                                                                            wp-includes/js/dist/edit-widgets.js on lines 3105..3118

                                                                            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

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

                                                                            const closeSmall = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
                                                                              xmlns: "http://www.w3.org/2000/svg",
                                                                              viewBox: "0 0 24 24",
                                                                              children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
                                                                                d: "M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"
                                                                            Severity: Major
                                                                            Found in wp-includes/js/dist/customize-widgets.js and 52 other locations - About 1 hr to fix
                                                                            wp-includes/js/dist/block-directory.js on lines 1358..1364
                                                                            wp-includes/js/dist/block-directory.js on lines 1373..1379
                                                                            wp-includes/js/dist/block-directory.js on lines 1787..1793
                                                                            wp-includes/js/dist/commands.js on lines 3193..3199
                                                                            wp-includes/js/dist/core-commands.js on lines 59..65
                                                                            wp-includes/js/dist/core-commands.js on lines 106..112
                                                                            wp-includes/js/dist/core-commands.js on lines 139..145
                                                                            wp-includes/js/dist/core-commands.js on lines 154..160
                                                                            wp-includes/js/dist/core-commands.js on lines 169..175
                                                                            wp-includes/js/dist/core-commands.js on lines 184..190
                                                                            wp-includes/js/dist/core-commands.js on lines 199..205
                                                                            wp-includes/js/dist/customize-widgets.js on lines 304..310
                                                                            wp-includes/js/dist/customize-widgets.js on lines 319..325
                                                                            wp-includes/js/dist/customize-widgets.js on lines 334..340
                                                                            wp-includes/js/dist/customize-widgets.js on lines 574..580
                                                                            wp-includes/js/dist/customize-widgets.js on lines 589..595
                                                                            wp-includes/js/dist/edit-post.js on lines 186..192
                                                                            wp-includes/js/dist/edit-post.js on lines 2480..2486
                                                                            wp-includes/js/dist/edit-widgets.js on lines 298..304
                                                                            wp-includes/js/dist/edit-widgets.js on lines 313..319
                                                                            wp-includes/js/dist/edit-widgets.js on lines 349..355
                                                                            wp-includes/js/dist/edit-widgets.js on lines 3194..3200
                                                                            wp-includes/js/dist/edit-widgets.js on lines 3453..3459
                                                                            wp-includes/js/dist/edit-widgets.js on lines 3468..3474
                                                                            wp-includes/js/dist/edit-widgets.js on lines 3483..3489
                                                                            wp-includes/js/dist/edit-widgets.js on lines 3498..3504
                                                                            wp-includes/js/dist/edit-widgets.js on lines 3713..3719
                                                                            wp-includes/js/dist/edit-widgets.js on lines 3728..3734
                                                                            wp-includes/js/dist/edit-widgets.js on lines 4317..4323
                                                                            wp-includes/js/dist/format-library.js on lines 39..45
                                                                            wp-includes/js/dist/format-library.js on lines 111..117
                                                                            wp-includes/js/dist/format-library.js on lines 358..364
                                                                            wp-includes/js/dist/format-library.js on lines 434..440
                                                                            wp-includes/js/dist/format-library.js on lines 1124..1130
                                                                            wp-includes/js/dist/format-library.js on lines 1264..1270
                                                                            wp-includes/js/dist/format-library.js on lines 1279..1285
                                                                            wp-includes/js/dist/format-library.js on lines 1570..1576
                                                                            wp-includes/js/dist/format-library.js on lines 1627..1633
                                                                            wp-includes/js/dist/format-library.js on lines 1684..1690
                                                                            wp-includes/js/dist/format-library.js on lines 1741..1747
                                                                            wp-includes/js/dist/format-library.js on lines 1804..1810
                                                                            wp-includes/js/dist/nux.js on lines 336..342
                                                                            wp-includes/js/dist/patterns.js on lines 859..865
                                                                            wp-includes/js/dist/plugins.js on lines 330..336
                                                                            wp-includes/js/dist/preferences.js on lines 92..98
                                                                            wp-includes/js/dist/preferences.js on lines 567..573
                                                                            wp-includes/js/dist/preferences.js on lines 582..588
                                                                            wp-includes/js/dist/reusable-blocks.js on lines 238..244
                                                                            wp-includes/js/dist/widgets.js on lines 92..98
                                                                            wp-includes/js/dist/widgets.js on lines 113..119
                                                                            wp-includes/js/dist/widgets.js on lines 1336..1342
                                                                            wp-includes/js/dist/widgets.js on lines 1556..1562

                                                                            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

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

                                                                            const plus = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
                                                                              xmlns: "http://www.w3.org/2000/svg",
                                                                              viewBox: "0 0 24 24",
                                                                              children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
                                                                                d: "M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"
                                                                            Severity: Major
                                                                            Found in wp-includes/js/dist/customize-widgets.js and 52 other locations - About 1 hr to fix
                                                                            wp-includes/js/dist/block-directory.js on lines 1358..1364
                                                                            wp-includes/js/dist/block-directory.js on lines 1373..1379
                                                                            wp-includes/js/dist/block-directory.js on lines 1787..1793
                                                                            wp-includes/js/dist/commands.js on lines 3193..3199
                                                                            wp-includes/js/dist/core-commands.js on lines 59..65
                                                                            wp-includes/js/dist/core-commands.js on lines 106..112
                                                                            wp-includes/js/dist/core-commands.js on lines 139..145
                                                                            wp-includes/js/dist/core-commands.js on lines 154..160
                                                                            wp-includes/js/dist/core-commands.js on lines 169..175
                                                                            wp-includes/js/dist/core-commands.js on lines 184..190
                                                                            wp-includes/js/dist/core-commands.js on lines 199..205
                                                                            wp-includes/js/dist/customize-widgets.js on lines 304..310
                                                                            wp-includes/js/dist/customize-widgets.js on lines 319..325
                                                                            wp-includes/js/dist/customize-widgets.js on lines 349..355
                                                                            wp-includes/js/dist/customize-widgets.js on lines 574..580
                                                                            wp-includes/js/dist/customize-widgets.js on lines 589..595
                                                                            wp-includes/js/dist/edit-post.js on lines 186..192
                                                                            wp-includes/js/dist/edit-post.js on lines 2480..2486
                                                                            wp-includes/js/dist/edit-widgets.js on lines 298..304
                                                                            wp-includes/js/dist/edit-widgets.js on lines 313..319
                                                                            wp-includes/js/dist/edit-widgets.js on lines 349..355
                                                                            wp-includes/js/dist/edit-widgets.js on lines 3194..3200
                                                                            wp-includes/js/dist/edit-widgets.js on lines 3453..3459
                                                                            wp-includes/js/dist/edit-widgets.js on lines 3468..3474
                                                                            wp-includes/js/dist/edit-widgets.js on lines 3483..3489
                                                                            wp-includes/js/dist/edit-widgets.js on lines 3498..3504
                                                                            wp-includes/js/dist/edit-widgets.js on lines 3713..3719
                                                                            wp-includes/js/dist/edit-widgets.js on lines 3728..3734
                                                                            wp-includes/js/dist/edit-widgets.js on lines 4317..4323
                                                                            wp-includes/js/dist/format-library.js on lines 39..45
                                                                            wp-includes/js/dist/format-library.js on lines 111..117
                                                                            wp-includes/js/dist/format-library.js on lines 358..364
                                                                            wp-includes/js/dist/format-library.js on lines 434..440
                                                                            wp-includes/js/dist/format-library.js on lines 1124..1130
                                                                            wp-includes/js/dist/format-library.js on lines 1264..1270
                                                                            wp-includes/js/dist/format-library.js on lines 1279..1285
                                                                            wp-includes/js/dist/format-library.js on lines 1570..1576
                                                                            wp-includes/js/dist/format-library.js on lines 1627..1633
                                                                            wp-includes/js/dist/format-library.js on lines 1684..1690
                                                                            wp-includes/js/dist/format-library.js on lines 1741..1747
                                                                            wp-includes/js/dist/format-library.js on lines 1804..1810
                                                                            wp-includes/js/dist/nux.js on lines 336..342
                                                                            wp-includes/js/dist/patterns.js on lines 859..865
                                                                            wp-includes/js/dist/plugins.js on lines 330..336
                                                                            wp-includes/js/dist/preferences.js on lines 92..98
                                                                            wp-includes/js/dist/preferences.js on lines 567..573
                                                                            wp-includes/js/dist/preferences.js on lines 582..588
                                                                            wp-includes/js/dist/reusable-blocks.js on lines 238..244
                                                                            wp-includes/js/dist/widgets.js on lines 92..98
                                                                            wp-includes/js/dist/widgets.js on lines 113..119
                                                                            wp-includes/js/dist/widgets.js on lines 1336..1342
                                                                            wp-includes/js/dist/widgets.js on lines 1556..1562

                                                                            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

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

                                                                            const external = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
                                                                              xmlns: "http://www.w3.org/2000/svg",
                                                                              viewBox: "0 0 24 24",
                                                                              children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
                                                                                d: "M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z"
                                                                            Severity: Major
                                                                            Found in wp-includes/js/dist/customize-widgets.js and 52 other locations - About 1 hr to fix
                                                                            wp-includes/js/dist/block-directory.js on lines 1358..1364
                                                                            wp-includes/js/dist/block-directory.js on lines 1373..1379
                                                                            wp-includes/js/dist/block-directory.js on lines 1787..1793
                                                                            wp-includes/js/dist/commands.js on lines 3193..3199
                                                                            wp-includes/js/dist/core-commands.js on lines 59..65
                                                                            wp-includes/js/dist/core-commands.js on lines 106..112
                                                                            wp-includes/js/dist/core-commands.js on lines 139..145
                                                                            wp-includes/js/dist/core-commands.js on lines 154..160
                                                                            wp-includes/js/dist/core-commands.js on lines 169..175
                                                                            wp-includes/js/dist/core-commands.js on lines 184..190
                                                                            wp-includes/js/dist/core-commands.js on lines 199..205
                                                                            wp-includes/js/dist/customize-widgets.js on lines 304..310
                                                                            wp-includes/js/dist/customize-widgets.js on lines 319..325
                                                                            wp-includes/js/dist/customize-widgets.js on lines 334..340
                                                                            wp-includes/js/dist/customize-widgets.js on lines 349..355
                                                                            wp-includes/js/dist/customize-widgets.js on lines 574..580
                                                                            wp-includes/js/dist/edit-post.js on lines 186..192
                                                                            wp-includes/js/dist/edit-post.js on lines 2480..2486
                                                                            wp-includes/js/dist/edit-widgets.js on lines 298..304
                                                                            wp-includes/js/dist/edit-widgets.js on lines 313..319
                                                                            wp-includes/js/dist/edit-widgets.js on lines 349..355
                                                                            wp-includes/js/dist/edit-widgets.js on lines 3194..3200
                                                                            wp-includes/js/dist/edit-widgets.js on lines 3453..3459
                                                                            wp-includes/js/dist/edit-widgets.js on lines 3468..3474
                                                                            wp-includes/js/dist/edit-widgets.js on lines 3483..3489
                                                                            wp-includes/js/dist/edit-widgets.js on lines 3498..3504
                                                                            wp-includes/js/dist/edit-widgets.js on lines 3713..3719
                                                                            wp-includes/js/dist/edit-widgets.js on lines 3728..3734
                                                                            wp-includes/js/dist/edit-widgets.js on lines 4317..4323
                                                                            wp-includes/js/dist/format-library.js on lines 39..45
                                                                            wp-includes/js/dist/format-library.js on lines 111..117
                                                                            wp-includes/js/dist/format-library.js on lines 358..364
                                                                            wp-includes/js/dist/format-library.js on lines 434..440
                                                                            wp-includes/js/dist/format-library.js on lines 1124..1130
                                                                            wp-includes/js/dist/format-library.js on lines 1264..1270
                                                                            wp-includes/js/dist/format-library.js on lines 1279..1285
                                                                            wp-includes/js/dist/format-library.js on lines 1570..1576
                                                                            wp-includes/js/dist/format-library.js on lines 1627..1633
                                                                            wp-includes/js/dist/format-library.js on lines 1684..1690
                                                                            wp-includes/js/dist/format-library.js on lines 1741..1747
                                                                            wp-includes/js/dist/format-library.js on lines 1804..1810
                                                                            wp-includes/js/dist/nux.js on lines 336..342
                                                                            wp-includes/js/dist/patterns.js on lines 859..865
                                                                            wp-includes/js/dist/plugins.js on lines 330..336
                                                                            wp-includes/js/dist/preferences.js on lines 92..98
                                                                            wp-includes/js/dist/preferences.js on lines 567..573
                                                                            wp-includes/js/dist/preferences.js on lines 582..588
                                                                            wp-includes/js/dist/reusable-blocks.js on lines 238..244
                                                                            wp-includes/js/dist/widgets.js on lines 92..98
                                                                            wp-includes/js/dist/widgets.js on lines 113..119
                                                                            wp-includes/js/dist/widgets.js on lines 1336..1342
                                                                            wp-includes/js/dist/widgets.js on lines 1556..1562

                                                                            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

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

                                                                            const undo = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
                                                                              xmlns: "http://www.w3.org/2000/svg",
                                                                              viewBox: "0 0 24 24",
                                                                              children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
                                                                                d: "M18.3 11.7c-.6-.6-1.4-.9-2.3-.9H6.7l2.9-3.3-1.1-1-4.5 5L8.5 16l1-1-2.7-2.7H16c.5 0 .9.2 1.3.5 1 1 1 3.4 1 4.5v.3h1.5v-.2c0-1.5 0-4.3-1.5-5.7z"
                                                                            Severity: Major
                                                                            Found in wp-includes/js/dist/customize-widgets.js and 52 other locations - About 1 hr to fix
                                                                            wp-includes/js/dist/block-directory.js on lines 1358..1364
                                                                            wp-includes/js/dist/block-directory.js on lines 1373..1379
                                                                            wp-includes/js/dist/block-directory.js on lines 1787..1793
                                                                            wp-includes/js/dist/commands.js on lines 3193..3199
                                                                            wp-includes/js/dist/core-commands.js on lines 59..65
                                                                            wp-includes/js/dist/core-commands.js on lines 106..112
                                                                            wp-includes/js/dist/core-commands.js on lines 139..145
                                                                            wp-includes/js/dist/core-commands.js on lines 154..160
                                                                            wp-includes/js/dist/core-commands.js on lines 169..175
                                                                            wp-includes/js/dist/core-commands.js on lines 184..190
                                                                            wp-includes/js/dist/core-commands.js on lines 199..205
                                                                            wp-includes/js/dist/customize-widgets.js on lines 319..325
                                                                            wp-includes/js/dist/customize-widgets.js on lines 334..340
                                                                            wp-includes/js/dist/customize-widgets.js on lines 349..355
                                                                            wp-includes/js/dist/customize-widgets.js on lines 574..580
                                                                            wp-includes/js/dist/customize-widgets.js on lines 589..595
                                                                            wp-includes/js/dist/edit-post.js on lines 186..192
                                                                            wp-includes/js/dist/edit-post.js on lines 2480..2486
                                                                            wp-includes/js/dist/edit-widgets.js on lines 298..304
                                                                            wp-includes/js/dist/edit-widgets.js on lines 313..319
                                                                            wp-includes/js/dist/edit-widgets.js on lines 349..355
                                                                            wp-includes/js/dist/edit-widgets.js on lines 3194..3200
                                                                            wp-includes/js/dist/edit-widgets.js on lines 3453..3459
                                                                            wp-includes/js/dist/edit-widgets.js on lines 3468..3474
                                                                            wp-includes/js/dist/edit-widgets.js on lines 3483..3489
                                                                            wp-includes/js/dist/edit-widgets.js on lines 3498..3504
                                                                            wp-includes/js/dist/edit-widgets.js on lines 3713..3719
                                                                            wp-includes/js/dist/edit-widgets.js on lines 3728..3734
                                                                            wp-includes/js/dist/edit-widgets.js on lines 4317..4323
                                                                            wp-includes/js/dist/format-library.js on lines 39..45
                                                                            wp-includes/js/dist/format-library.js on lines 111..117
                                                                            wp-includes/js/dist/format-library.js on lines 358..364
                                                                            wp-includes/js/dist/format-library.js on lines 434..440
                                                                            wp-includes/js/dist/format-library.js on lines 1124..1130
                                                                            wp-includes/js/dist/format-library.js on lines 1264..1270
                                                                            wp-includes/js/dist/format-library.js on lines 1279..1285
                                                                            wp-includes/js/dist/format-library.js on lines 1570..1576
                                                                            wp-includes/js/dist/format-library.js on lines 1627..1633
                                                                            wp-includes/js/dist/format-library.js on lines 1684..1690
                                                                            wp-includes/js/dist/format-library.js on lines 1741..1747
                                                                            wp-includes/js/dist/format-library.js on lines 1804..1810
                                                                            wp-includes/js/dist/nux.js on lines 336..342
                                                                            wp-includes/js/dist/patterns.js on lines 859..865
                                                                            wp-includes/js/dist/plugins.js on lines 330..336
                                                                            wp-includes/js/dist/preferences.js on lines 92..98
                                                                            wp-includes/js/dist/preferences.js on lines 567..573
                                                                            wp-includes/js/dist/preferences.js on lines 582..588
                                                                            wp-includes/js/dist/reusable-blocks.js on lines 238..244
                                                                            wp-includes/js/dist/widgets.js on lines 92..98
                                                                            wp-includes/js/dist/widgets.js on lines 113..119
                                                                            wp-includes/js/dist/widgets.js on lines 1336..1342
                                                                            wp-includes/js/dist/widgets.js on lines 1556..1562

                                                                            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

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

                                                                            const redo = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
                                                                              xmlns: "http://www.w3.org/2000/svg",
                                                                              viewBox: "0 0 24 24",
                                                                              children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
                                                                                d: "M15.6 6.5l-1.1 1 2.9 3.3H8c-.9 0-1.7.3-2.3.9-1.4 1.5-1.4 4.2-1.4 5.6v.2h1.5v-.3c0-1.1 0-3.5 1-4.5.3-.3.7-.5 1.3-.5h9.2L14.5 15l1.1 1.1 4.6-4.6-4.6-5z"
                                                                            Severity: Major
                                                                            Found in wp-includes/js/dist/customize-widgets.js and 52 other locations - About 1 hr to fix
                                                                            wp-includes/js/dist/block-directory.js on lines 1358..1364
                                                                            wp-includes/js/dist/block-directory.js on lines 1373..1379
                                                                            wp-includes/js/dist/block-directory.js on lines 1787..1793
                                                                            wp-includes/js/dist/commands.js on lines 3193..3199
                                                                            wp-includes/js/dist/core-commands.js on lines 59..65
                                                                            wp-includes/js/dist/core-commands.js on lines 106..112
                                                                            wp-includes/js/dist/core-commands.js on lines 139..145
                                                                            wp-includes/js/dist/core-commands.js on lines 154..160
                                                                            wp-includes/js/dist/core-commands.js on lines 169..175
                                                                            wp-includes/js/dist/core-commands.js on lines 184..190
                                                                            wp-includes/js/dist/core-commands.js on lines 199..205
                                                                            wp-includes/js/dist/customize-widgets.js on lines 304..310
                                                                            wp-includes/js/dist/customize-widgets.js on lines 334..340
                                                                            wp-includes/js/dist/customize-widgets.js on lines 349..355
                                                                            wp-includes/js/dist/customize-widgets.js on lines 574..580
                                                                            wp-includes/js/dist/customize-widgets.js on lines 589..595
                                                                            wp-includes/js/dist/edit-post.js on lines 186..192
                                                                            wp-includes/js/dist/edit-post.js on lines 2480..2486
                                                                            wp-includes/js/dist/edit-widgets.js on lines 298..304
                                                                            wp-includes/js/dist/edit-widgets.js on lines 313..319
                                                                            wp-includes/js/dist/edit-widgets.js on lines 349..355
                                                                            wp-includes/js/dist/edit-widgets.js on lines 3194..3200
                                                                            wp-includes/js/dist/edit-widgets.js on lines 3453..3459
                                                                            wp-includes/js/dist/edit-widgets.js on lines 3468..3474
                                                                            wp-includes/js/dist/edit-widgets.js on lines 3483..3489
                                                                            wp-includes/js/dist/edit-widgets.js on lines 3498..3504
                                                                            wp-includes/js/dist/edit-widgets.js on lines 3713..3719
                                                                            wp-includes/js/dist/edit-widgets.js on lines 3728..3734
                                                                            wp-includes/js/dist/edit-widgets.js on lines 4317..4323
                                                                            wp-includes/js/dist/format-library.js on lines 39..45
                                                                            wp-includes/js/dist/format-library.js on lines 111..117
                                                                            wp-includes/js/dist/format-library.js on lines 358..364
                                                                            wp-includes/js/dist/format-library.js on lines 434..440
                                                                            wp-includes/js/dist/format-library.js on lines 1124..1130
                                                                            wp-includes/js/dist/format-library.js on lines 1264..1270
                                                                            wp-includes/js/dist/format-library.js on lines 1279..1285
                                                                            wp-includes/js/dist/format-library.js on lines 1570..1576
                                                                            wp-includes/js/dist/format-library.js on lines 1627..1633
                                                                            wp-includes/js/dist/format-library.js on lines 1684..1690
                                                                            wp-includes/js/dist/format-library.js on lines 1741..1747
                                                                            wp-includes/js/dist/format-library.js on lines 1804..1810
                                                                            wp-includes/js/dist/nux.js on lines 336..342
                                                                            wp-includes/js/dist/patterns.js on lines 859..865
                                                                            wp-includes/js/dist/plugins.js on lines 330..336
                                                                            wp-includes/js/dist/preferences.js on lines 92..98
                                                                            wp-includes/js/dist/preferences.js on lines 567..573
                                                                            wp-includes/js/dist/preferences.js on lines 582..588
                                                                            wp-includes/js/dist/reusable-blocks.js on lines 238..244
                                                                            wp-includes/js/dist/widgets.js on lines 92..98
                                                                            wp-includes/js/dist/widgets.js on lines 113..119
                                                                            wp-includes/js/dist/widgets.js on lines 1336..1342
                                                                            wp-includes/js/dist/widgets.js on lines 1556..1562

                                                                            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

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

                                                                            const moreVertical = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
                                                                              xmlns: "http://www.w3.org/2000/svg",
                                                                              viewBox: "0 0 24 24",
                                                                              children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
                                                                                d: "M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"
                                                                            Severity: Major
                                                                            Found in wp-includes/js/dist/customize-widgets.js and 52 other locations - About 1 hr to fix
                                                                            wp-includes/js/dist/block-directory.js on lines 1358..1364
                                                                            wp-includes/js/dist/block-directory.js on lines 1373..1379
                                                                            wp-includes/js/dist/block-directory.js on lines 1787..1793
                                                                            wp-includes/js/dist/commands.js on lines 3193..3199
                                                                            wp-includes/js/dist/core-commands.js on lines 59..65
                                                                            wp-includes/js/dist/core-commands.js on lines 106..112
                                                                            wp-includes/js/dist/core-commands.js on lines 139..145
                                                                            wp-includes/js/dist/core-commands.js on lines 154..160
                                                                            wp-includes/js/dist/core-commands.js on lines 169..175
                                                                            wp-includes/js/dist/core-commands.js on lines 184..190
                                                                            wp-includes/js/dist/core-commands.js on lines 199..205
                                                                            wp-includes/js/dist/customize-widgets.js on lines 304..310
                                                                            wp-includes/js/dist/customize-widgets.js on lines 319..325
                                                                            wp-includes/js/dist/customize-widgets.js on lines 334..340
                                                                            wp-includes/js/dist/customize-widgets.js on lines 349..355
                                                                            wp-includes/js/dist/customize-widgets.js on lines 589..595
                                                                            wp-includes/js/dist/edit-post.js on lines 186..192
                                                                            wp-includes/js/dist/edit-post.js on lines 2480..2486
                                                                            wp-includes/js/dist/edit-widgets.js on lines 298..304
                                                                            wp-includes/js/dist/edit-widgets.js on lines 313..319
                                                                            wp-includes/js/dist/edit-widgets.js on lines 349..355
                                                                            wp-includes/js/dist/edit-widgets.js on lines 3194..3200
                                                                            wp-includes/js/dist/edit-widgets.js on lines 3453..3459
                                                                            wp-includes/js/dist/edit-widgets.js on lines 3468..3474
                                                                            wp-includes/js/dist/edit-widgets.js on lines 3483..3489
                                                                            wp-includes/js/dist/edit-widgets.js on lines 3498..3504
                                                                            wp-includes/js/dist/edit-widgets.js on lines 3713..3719
                                                                            wp-includes/js/dist/edit-widgets.js on lines 3728..3734
                                                                            wp-includes/js/dist/edit-widgets.js on lines 4317..4323
                                                                            wp-includes/js/dist/format-library.js on lines 39..45
                                                                            wp-includes/js/dist/format-library.js on lines 111..117
                                                                            wp-includes/js/dist/format-library.js on lines 358..364
                                                                            wp-includes/js/dist/format-library.js on lines 434..440
                                                                            wp-includes/js/dist/format-library.js on lines 1124..1130
                                                                            wp-includes/js/dist/format-library.js on lines 1264..1270
                                                                            wp-includes/js/dist/format-library.js on lines 1279..1285
                                                                            wp-includes/js/dist/format-library.js on lines 1570..1576
                                                                            wp-includes/js/dist/format-library.js on lines 1627..1633
                                                                            wp-includes/js/dist/format-library.js on lines 1684..1690
                                                                            wp-includes/js/dist/format-library.js on lines 1741..1747
                                                                            wp-includes/js/dist/format-library.js on lines 1804..1810
                                                                            wp-includes/js/dist/nux.js on lines 336..342
                                                                            wp-includes/js/dist/patterns.js on lines 859..865
                                                                            wp-includes/js/dist/plugins.js on lines 330..336
                                                                            wp-includes/js/dist/preferences.js on lines 92..98
                                                                            wp-includes/js/dist/preferences.js on lines 567..573
                                                                            wp-includes/js/dist/preferences.js on lines 582..588
                                                                            wp-includes/js/dist/reusable-blocks.js on lines 238..244
                                                                            wp-includes/js/dist/widgets.js on lines 92..98
                                                                            wp-includes/js/dist/widgets.js on lines 113..119
                                                                            wp-includes/js/dist/widgets.js on lines 1336..1342
                                                                            wp-includes/js/dist/widgets.js on lines 1556..1562

                                                                            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

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

                                                                                      children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuItem, {
                                                                                        onClick: () => {
                                                                                          setIsKeyboardShortcutsModalVisible(true);
                                                                                        },
                                                                                        shortcut: external_wp_keycodes_namespaceObject.displayShortcut.access('h'),
                                                                            Severity: Major
                                                                            Found in wp-includes/js/dist/customize-widgets.js and 1 other location - About 1 hr to fix
                                                                            wp-includes/js/dist/edit-widgets.js on lines 4094..4100

                                                                            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

                                                                            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/customize-widgets.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 198..200
                                                                            wp-includes/js/dist/compose.js on lines 2257..2259
                                                                            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/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 32..34
                                                                            wp-includes/js/dist/edit-widgets.js on lines 32..34
                                                                            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 20..22
                                                                            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 32..34
                                                                            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

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

                                                                              subscribeHistory(listener) {
                                                                                this.historySubscribers.add(listener);
                                                                                return () => {
                                                                                  this.historySubscribers.delete(listener);
                                                                                };
                                                                            Severity: Major
                                                                            Found in wp-includes/js/dist/customize-widgets.js and 3 other locations - About 35 mins to fix
                                                                            wp-includes/js/dist/core-data.js on lines 1884..1889
                                                                            wp-includes/js/dist/customize-widgets.js on lines 2197..2202
                                                                            wp-includes/js/dist/customize-widgets.js on lines 2531..2536

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

                                                                            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

                                                                              subscribe(callback) {
                                                                                this.subscribers.add(callback);
                                                                                return () => {
                                                                                  this.subscribers.delete(callback);
                                                                                };
                                                                            Severity: Major
                                                                            Found in wp-includes/js/dist/customize-widgets.js and 3 other locations - About 35 mins to fix
                                                                            wp-includes/js/dist/core-data.js on lines 1884..1889
                                                                            wp-includes/js/dist/customize-widgets.js on lines 2372..2377
                                                                            wp-includes/js/dist/customize-widgets.js on lines 2531..2536

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

                                                                            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

                                                                                subscribe(callback) {
                                                                                  this.subscribers.add(callback);
                                                                                  return () => {
                                                                                    this.subscribers.delete(callback);
                                                                                  };
                                                                            Severity: Major
                                                                            Found in wp-includes/js/dist/customize-widgets.js and 3 other locations - About 35 mins to fix
                                                                            wp-includes/js/dist/core-data.js on lines 1884..1889
                                                                            wp-includes/js/dist/customize-widgets.js on lines 2197..2202
                                                                            wp-includes/js/dist/customize-widgets.js on lines 2372..2377

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

                                                                            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 shortcut = (0,external_wp_keycodes_namespaceObject.isAppleOS)() ? external_wp_keycodes_namespaceObject.displayShortcut.primaryShift('z') : external_wp_keycodes_namespaceObject.displayShortcut.primary('y');
                                                                            Severity: Minor
                                                                            Found in wp-includes/js/dist/customize-widgets.js and 1 other location - About 35 mins to fix
                                                                            wp-includes/js/dist/edit-widgets.js on lines 3554..3554

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

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

                                                                                      }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_preferences_namespaceObject.PreferenceToggleMenuItem, {
                                                                                        scope: "core/customize-widgets",
                                                                                        name: "welcomeGuide",
                                                                                        label: (0,external_wp_i18n_namespaceObject.__)('Welcome Guide')
                                                                                      }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.MenuItem, {
                                                                            Severity: Major
                                                                            Found in wp-includes/js/dist/customize-widgets.js and 4 other locations - About 35 mins to fix
                                                                            wp-includes/js/dist/edit-widgets.js on lines 4100..4104
                                                                            wp-includes/js/dist/edit-widgets.js on lines 4189..4193
                                                                            wp-includes/js/dist/format-library.js on lines 1918..1922
                                                                            wp-includes/js/dist/reusable-blocks.js on lines 407..411

                                                                            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

                                                                            There are no issues that match your filters.

                                                                            Category
                                                                            Status