{"results":{"result":{"added-files":{"code-health":9.059550544802077,"old-code-health":0.0,"files":[{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/table/table.tiptap-extension.ts","loc":428,"code-health":8.545379580978913},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/html-attr-class/html-attr-class.tiptap-extension.ts","loc":55,"code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/html-attr-dataset/html-attr-dataset.tiptap-extension.ts","loc":69,"code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/html-attr-id/html-attr-id.tiptap-extension.ts","loc":53,"code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/html-attr-style/html-attr-style.tiptap-extension.ts","loc":57,"code-health":10.0}]},"external-review-url":"https://github.com/umbraco/Umbraco-CMS/pull/20256","old-code-health":9.768080387284655,"modified-files":{"code-health":9.751351992874556,"old-code-health":9.768080387284655,"files":[{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/bubble-menu/bubble-menu.tiptap-extension.ts","loc":90,"old-loc":90,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/table/table.tiptap-api.ts","loc":113,"old-loc":113,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/anchor/anchor.tiptap-api.ts","loc":19,"old-loc":19,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/anchor/anchor.tiptap-extension.ts","loc":37,"old-loc":37,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/anchor/anchor.tiptap-toolbar-api.ts","loc":21,"old-loc":21,"code-health":9.6882083290695,"old-code-health":9.6882083290695},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/html-tag-div/html-tag-div.tiptap-api.ts","loc":5,"old-loc":5,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/html-tag-div/html-tag-div.tiptap-extension.ts","loc":19,"old-loc":19,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/html-tag-span/html-tag-span.tiptap-api.ts","loc":5,"old-loc":5,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/html-tag-span/html-tag-span.tiptap-extension.ts","loc":99,"old-loc":99,"code-health":9.554464361611602,"old-code-health":9.554464361611602},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/html-attr-class/html-attr-class.tiptap-api.ts","loc":34,"old-loc":88,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/html-attr-dataset/html-attr-dataset.tiptap-api.ts","loc":34,"old-loc":102,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/html-attr-id/html-attr-id.tiptap-api.ts","loc":34,"old-loc":86,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/html-attr-style/html-attr-style.tiptap-api.ts","loc":34,"old-loc":90,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/figure/figcaption.tiptap-extension.ts","loc":22,"old-loc":22,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/figure/figure.tiptap-api.ts","loc":6,"old-loc":5,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/figure/figure.tiptap-extension.ts","loc":41,"old-loc":41,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/text-direction/text-direction.tiptap-api.ts","loc":9,"old-loc":9,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/text-direction/text-direction.tiptap-extension.ts","loc":52,"old-loc":52,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/text-indent/text-indent.tiptap-api.ts","loc":9,"old-loc":9,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/text-indent/text-indent.tiptap-extension.ts","loc":96,"old-loc":96,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/trailing-node/trailing-node.tiptap-api.ts","loc":5,"old-loc":5,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/trailing-node/trailing-node.tiptap-extension.ts","loc":52,"old-loc":52,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/embedded-media/embedded-media.tiptap-api.ts","loc":29,"old-loc":29,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/embedded-media/embedded-media.tiptap-extension.ts","loc":63,"old-loc":63,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/embedded-media/embedded-media.tiptap-toolbar-api.ts","loc":31,"old-loc":31,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/link/link.tiptap-api.ts","loc":5,"old-loc":5,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/link/link.tiptap-extension.ts","loc":49,"old-loc":49,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/link/link.tiptap-toolbar-api.ts","loc":100,"old-loc":100,"code-health":8.816158827775617,"old-code-health":8.816158827775617},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/image/image.tiptap-api.ts","loc":24,"old-loc":24,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/image/image.tiptap-extension.ts","loc":44,"old-loc":44,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/components/input-tiptap/input-tiptap.element.ts","loc":279,"old-loc":279,"code-health":8.997354731618337,"old-code-health":8.997354731618337},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/components/statusbar/tiptap-statusbar.element.ts","loc":109,"old-loc":109,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/components/toolbar/tiptap-toolbar-button.element.ts","loc":56,"old-loc":56,"code-health":9.6882083290695,"old-code-health":9.6882083290695},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/components/toolbar/tiptap-toolbar-menu.element.ts","loc":158,"old-loc":158,"code-health":9.387218218812514,"old-code-health":9.387218218812514},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/components/toolbar/tiptap-toolbar.element.ts","loc":137,"old-loc":137,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/contexts/tiptap-rte.context.ts","loc":16,"old-loc":16,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/block/block.tipap-api.ts","loc":116,"old-loc":116,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/block/block.tiptap-toolbar-api.ts","loc":46,"old-loc":46,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/blockquote/blockquote.tiptap-api.ts","loc":13,"old-loc":13,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/blockquote/blockquote.tiptap-toolbar-api.ts","loc":7,"old-loc":7,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/bold/bold.tiptap-api.ts","loc":5,"old-loc":5,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/bold/bold.tiptap-toolbar-api.ts","loc":7,"old-loc":7,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/bullet-list/bullet-list.tiptap-api.ts","loc":14,"old-loc":14,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/bullet-list/bullet-list.tiptap-toolbar-api.ts","loc":7,"old-loc":7,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/character-map/character-map.tiptap-toolbar-api.ts","loc":16,"old-loc":16,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/clear-formatting/clear-formatting.tiptap-toolbar-api.ts","loc":7,"old-loc":7,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/code-block/code-block.tiptap-api.ts","loc":26,"old-loc":26,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/code-block/code-block.tiptap-toolbar-api.ts","loc":7,"old-loc":7,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/core/rich-text-essentials.tiptap-api.ts","loc":5,"old-loc":13,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/element-path/element-path.tiptap-statusbar-element.ts","loc":66,"old-loc":66,"code-health":9.536386775820924,"old-code-health":9.536386775820924},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/font-family/font-family.tiptap-toolbar-api.ts","loc":13,"old-loc":13,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/font-size/font-size.tiptap-toolbar-api.ts","loc":13,"old-loc":13,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/heading/heading.tiptap-api.ts","loc":20,"old-loc":20,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/heading/heading1.tiptap-toolbar-api.ts","loc":10,"old-loc":10,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/heading/heading2.tiptap-toolbar-api.ts","loc":10,"old-loc":10,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/heading/heading3.tiptap-toolbar-api.ts","loc":10,"old-loc":10,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/horizontal-rule/horizontal-rule.tiptap-api.ts","loc":5,"old-loc":5,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/horizontal-rule/horizontal-rule.tiptap-toolbar-api.ts","loc":7,"old-loc":7,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/italic/italic.tiptap-api.ts","loc":5,"old-loc":5,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/italic/italic.tiptap-toolbar-api.ts","loc":7,"old-loc":7,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/link/unlink.tiptap-toolbar-api.ts","loc":9,"old-loc":9,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/media-picker/media-picker.tiptap-toolbar-api.ts","loc":125,"old-loc":125,"code-health":9.073849999419705,"old-code-health":9.073849999419705},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/media-upload/media-upload.tiptap-api.ts","loc":105,"old-loc":105,"code-health":9.6882083290695,"old-code-health":9.6882083290695},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/ordered-list/ordered-list.tiptap-api.ts","loc":14,"old-loc":14,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/ordered-list/ordered-list.tiptap-toolbar-api.ts","loc":9,"old-loc":9,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/strike/strike.tiptap-api.ts","loc":5,"old-loc":5,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/strike/strike.tiptap-toolbar-api.ts","loc":7,"old-loc":7,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/style-menu/style-menu.tiptap-toolbar-api.ts","loc":54,"old-loc":54,"code-health":9.313614294706117,"old-code-health":9.313614294706117},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/subscript/subscript.tiptap-api.ts","loc":5,"old-loc":5,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/subscript/subscript.tiptap-toolbar-api.ts","loc":7,"old-loc":7,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/superscript/superscript.tiptap-api.ts","loc":5,"old-loc":5,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/superscript/superscript.tiptap-toolbar-api.ts","loc":7,"old-loc":7,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/table/actions/table-properties.action.ts","loc":99,"old-loc":99,"code-health":9.6882083290695,"old-code-health":9.6882083290695},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/table/components/table-column-menu.element.ts","loc":43,"old-loc":42,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/table/components/table-insert.element.ts","loc":80,"old-loc":80,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/table/components/table-row-menu.element.ts","loc":43,"old-loc":42,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/table/table.tiptap-toolbar-api.ts","loc":9,"old-loc":9,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/text-align/text-align-center.tiptap-toolbar-api.ts","loc":14,"old-loc":14,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/text-align/text-align-justify.tiptap-toolbar-api.ts","loc":14,"old-loc":14,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/text-align/text-align-left.tiptap-toolbar-api.ts","loc":14,"old-loc":14,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/text-align/text-align-right.tiptap-toolbar-api.ts","loc":14,"old-loc":14,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/text-align/text-align.tiptap-api.ts","loc":9,"old-loc":9,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/text-color/text-color-background.tiptap-toolbar-api.ts","loc":7,"old-loc":7,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/text-color/text-color-foreground.tiptap-toolbar-api.ts","loc":7,"old-loc":7,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/text-direction/text-direction-ltr.tiptap-toolbar-api.ts","loc":13,"old-loc":13,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/text-direction/text-direction-rtl.tiptap-toolbar-api.ts","loc":12,"old-loc":12,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/text-indent/text-indent.tiptap-toolbar-api.ts","loc":7,"old-loc":7,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/text-indent/text-outdent.tiptap-toolbar-api.ts","loc":7,"old-loc":7,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/tiptap-extension-api-base.ts","loc":15,"old-loc":15,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/tiptap-toolbar-element-api-base.ts","loc":20,"old-loc":20,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/underline/underline.tiptap-api.ts","loc":5,"old-loc":5,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/underline/underline.tiptap-toolbar-api.ts","loc":7,"old-loc":7,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/undo-redo/redo.tiptap-toolbar-api.ts","loc":9,"old-loc":9,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/undo-redo/undo.tiptap-toolbar-api.ts","loc":9,"old-loc":9,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/view-source/source-editor.tiptap-toolbar-api.ts","loc":21,"old-loc":21,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/word-count/word-count.tiptap-api.ts","loc":7,"old-loc":7,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/word-count/word-count.tiptap-statusbar-element.ts","loc":43,"old-loc":43,"code-health":10.0,"old-code-health":10.0}]},"removed-files":{"code-health":0.0,"old-code-health":0.0,"files":[]},"external-review-id":"20256","analysis-time":"2025-09-24T15:42:01Z","negative-impact-count":5,"suppressions":{"number-of-types":0,"number-of-files-touched":0,"findings":[]},"affected-hotspots":1,"commits":["e1908d7f5fc078499ff610a6b2270537f1c00c9c","803531d3f303aa9899ed3f085617d5e33179279b","90fdcf7097858f54b467133caaae11412259bcb7","2d87cfb418d0808997bbd57986f042049c154e14","4fb39c88dfaf073eafd3d7dd870cf8cd543ab9e7","92262ab6a928aa0ffb11e20a2ad06ac83ff1d9ad","48e6057081777e015e73e0a54b578019ef3c82c1","72114a791cc22df742d819453a68f996d9c91b4e","f7d7a3e051cb014f5e63535f856e2aa59e20edca","841eb4759baabafe8b104a0a98b275842f5184c6","5cc30738939ef3cc2dad9a7f2e61bb7cccdb81fa","03d54b6e64804be21f48b2d8bc13b9301aa57ea0","2cf15dc2ce09db1c7814c43ffe56bc1d12314254","a246fe43abad7dc15048a5d4d04821858e58152f","4c2971ecd961a16d824bb5f25adc9913ae24ea41","1bab919eac1fbc39ea852ad875f2abb7e1bc1069"],"is-negative-review":true,"negative-findings":{"number-of-types":3,"number-of-files-touched":1,"findings":[{"why-it-occurs":"Duplicated code often leads to code that's harder to change since the same logical change has to be done in multiple functions. More duplication gives lower code health.","name":"Code Duplication","file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/table/table.tiptap-extension.ts","refactoring-examples":null,"change-level":"warning","is-hotspot?":false,"line":68,"what-changed":"The module contains 4 functions with similar structure: UmbTableCell.addProseMirrorPlugins,UmbTableHeader.addProseMirrorPlugins,isColumnGripSelected,isRowGripSelected","how-to-fix":"A certain degree of duplicated code might be acceptable. The problems start when it is the same behavior that is duplicated across the functions in the module, ie. a violation of the Don't Repeat Yourself (DRY) principle. DRY violations lead to code that is changed together in predictable patterns, which is both expensive and risky. DRY violations can be identified using CodeScene's X-Ray analysis to detect clusters of change coupled functions with high code similarity. [Read More](https://codescene.com/blog/software-revolution-part3/)\n\nOnce you have identified the similarities across functions, look to extract and encapsulate the concept that varies into its own function(s). These shared abstractions can then be re-used, which minimizes the amount of duplication and simplifies change.","change-type":"introduced"},{"method":"isRowGripSelected","why-it-occurs":"A Complex Method has a high cyclomatic complexity. The recommended threshold for the TypeScript language is a cyclomatic complexity lower than 9.","name":"Complex Method","file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/table/table.tiptap-extension.ts","refactoring-examples":[{"diff":"diff --git a/complex_method.js b/complex_method.js\nindex 10cce78e6d..0c1a8cabaf 100644\n--- a/complex_method.js\n+++ b/complex_method.js\n@@ -1,15 +1,20 @@\n function postItem(item) {\n   if (!item.id) {\n-    if (item.x != null && item.y != null) {\n-      post(item);\n-    } else {\n-      throw Error(\"Item must have x and y\");\n-    }\n+    // extract a separate function for creating new item\n+    postNew(item);\n   } else {\n-    if (item.x < 10 && item.y > 25) {\n-      put(item);\n-    } else {\n-      throw Error(\"Item must have an x and y value between 10 and 25\");\n-    }\n+    // and one for updating existing items\n+    updateItem(item);\n   }\n }\n+\n+function postNew(item) {\n+  validateNew(item);\n+  post(item);\n+}\n+\n+function updateItem(item) {\n+  validateUpdate(item);\n+  put(item);\n+}\n+\n","language":"typescript","improvement-type":"Complex Method"}],"change-level":"warning","is-hotspot?":false,"line":499,"what-changed":"isRowGripSelected has a cyclomatic complexity of 9, threshold = 9","how-to-fix":"There are many reasons for Complex Method. Sometimes, another design approach is beneficial such as a) modeling state using an explicit state machine rather than conditionals, or b) using table lookup rather than long chains of logic. In other scenarios, the function can be split using [EXTRACT FUNCTION](https://refactoring.com/catalog/extractFunction.html). Just make sure you extract natural and cohesive functions. Complex Methods can also be addressed by identifying complex conditional expressions and then using the [DECOMPOSE CONDITIONAL](https://refactoring.com/catalog/decomposeConditional.html) refactoring.","change-type":"introduced"},{"method":"isColumnGripSelected","why-it-occurs":"A Complex Method has a high cyclomatic complexity. The recommended threshold for the TypeScript language is a cyclomatic complexity lower than 9.","name":"Complex Method","file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/table/table.tiptap-extension.ts","refactoring-examples":[{"diff":"diff --git a/complex_method.js b/complex_method.js\nindex 10cce78e6d..0c1a8cabaf 100644\n--- a/complex_method.js\n+++ b/complex_method.js\n@@ -1,15 +1,20 @@\n function postItem(item) {\n   if (!item.id) {\n-    if (item.x != null && item.y != null) {\n-      post(item);\n-    } else {\n-      throw Error(\"Item must have x and y\");\n-    }\n+    // extract a separate function for creating new item\n+    postNew(item);\n   } else {\n-    if (item.x < 10 && item.y > 25) {\n-      put(item);\n-    } else {\n-      throw Error(\"Item must have an x and y value between 10 and 25\");\n-    }\n+    // and one for updating existing items\n+    updateItem(item);\n   }\n }\n+\n+function postNew(item) {\n+  validateNew(item);\n+  post(item);\n+}\n+\n+function updateItem(item) {\n+  validateUpdate(item);\n+  put(item);\n+}\n+\n","language":"typescript","improvement-type":"Complex Method"}],"change-level":"warning","is-hotspot?":false,"line":469,"what-changed":"isColumnGripSelected has a cyclomatic complexity of 9, threshold = 9","how-to-fix":"There are many reasons for Complex Method. Sometimes, another design approach is beneficial such as a) modeling state using an explicit state machine rather than conditionals, or b) using table lookup rather than long chains of logic. In other scenarios, the function can be split using [EXTRACT FUNCTION](https://refactoring.com/catalog/extractFunction.html). Just make sure you extract natural and cohesive functions. Complex Methods can also be addressed by identifying complex conditional expressions and then using the [DECOMPOSE CONDITIONAL](https://refactoring.com/catalog/decomposeConditional.html) refactoring.","change-type":"introduced"},{"method":"isColumnGripSelected","why-it-occurs":"A complex conditional is an expression inside a branch such as an <code>if</code>-statmeent which consists of multiple, logical operations. Example: <code>if (x.started() && y.running())</code>.Complex conditionals make the code even harder to read, and contribute to the Complex Method code smell. Encapsulate them.","name":"Complex Conditional","file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/table/table.tiptap-extension.ts","refactoring-examples":[{"diff":"diff --git a/complex_conditional.js b/complex_conditional.js\nindex c43da09584..94259ce874 100644\n--- a/complex_conditional.js\n+++ b/complex_conditional.js\n@@ -1,16 +1,34 @@\n function messageReceived(message, timeReceived) {\n-   // Ignore all messages which aren't from known customers:\n-   if (!message.sender &&\n-       customers.getId(message.name) == null) {\n+   // Refactoring #1: encapsulate the business rule in a\n+   // function. A clear name replaces the need for the comment:\n+   if (!knownCustomer(message)) {\n      log('spam received -- ignoring');\n      return;\n    }\n \n-  // Provide an auto-reply when outside business hours:\n-  if ((timeReceived.getHours() > 17) ||\n-      (timeReceived.getHours() < 8)) {\n+  // Refactoring #2: encapsulate the business rule.\n+  // Again, note how a clear function name replaces the\n+  // need for a code comment:\n+  if (outsideBusinessHours(timeReceived)) {\n     return autoReplyTo(message);\n   }\n \n   pingAgentFor(message);\n+}\n+\n+function outsideBusinessHours(timeReceived) {\n+  // Refactoring #3: replace magic numbers with\n+  // symbols that communicate with the code reader:\n+  const closingHour = 17;\n+  const openingHour = 8;\n+\n+  const hours = timeReceived.getHours();\n+\n+  // Refactoring #4: simple conditional rules can\n+  // be further clarified by introducing a variable:\n+  const afterClosing = hours > closingHour;\n+  const beforeOpening = hours < openingHour;\n+\n+  // Yeah -- look how clear the business rule is now!\n+  return afterClosing || beforeOpening;\n }\n\\ No newline at end of file\n","language":"typescript","improvement-type":"Complex Conditional"}],"change-level":"warning","is-hotspot?":false,"line":484,"what-changed":"isColumnGripSelected has 1 complex conditionals with 2 branches, threshold = 2","how-to-fix":"Apply the [DECOMPOSE CONDITIONAL](https://refactoring.com/catalog/decomposeConditional.html) refactoring so that the complex conditional is encapsulated in a separate function with a good name that captures the business rule. Optionally, for simple expressions, introduce a new variable which holds the result of the complex conditional.","change-type":"introduced"},{"method":"isRowGripSelected","why-it-occurs":"A complex conditional is an expression inside a branch such as an <code>if</code>-statmeent which consists of multiple, logical operations. Example: <code>if (x.started() && y.running())</code>.Complex conditionals make the code even harder to read, and contribute to the Complex Method code smell. Encapsulate them.","name":"Complex Conditional","file":"src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/table/table.tiptap-extension.ts","refactoring-examples":[{"diff":"diff --git a/complex_conditional.js b/complex_conditional.js\nindex c43da09584..94259ce874 100644\n--- a/complex_conditional.js\n+++ b/complex_conditional.js\n@@ -1,16 +1,34 @@\n function messageReceived(message, timeReceived) {\n-   // Ignore all messages which aren't from known customers:\n-   if (!message.sender &&\n-       customers.getId(message.name) == null) {\n+   // Refactoring #1: encapsulate the business rule in a\n+   // function. A clear name replaces the need for the comment:\n+   if (!knownCustomer(message)) {\n      log('spam received -- ignoring');\n      return;\n    }\n \n-  // Provide an auto-reply when outside business hours:\n-  if ((timeReceived.getHours() > 17) ||\n-      (timeReceived.getHours() < 8)) {\n+  // Refactoring #2: encapsulate the business rule.\n+  // Again, note how a clear function name replaces the\n+  // need for a code comment:\n+  if (outsideBusinessHours(timeReceived)) {\n     return autoReplyTo(message);\n   }\n \n   pingAgentFor(message);\n+}\n+\n+function outsideBusinessHours(timeReceived) {\n+  // Refactoring #3: replace magic numbers with\n+  // symbols that communicate with the code reader:\n+  const closingHour = 17;\n+  const openingHour = 8;\n+\n+  const hours = timeReceived.getHours();\n+\n+  // Refactoring #4: simple conditional rules can\n+  // be further clarified by introducing a variable:\n+  const afterClosing = hours > closingHour;\n+  const beforeOpening = hours < openingHour;\n+\n+  // Yeah -- look how clear the business rule is now!\n+  return afterClosing || beforeOpening;\n }\n\\ No newline at end of file\n","language":"typescript","improvement-type":"Complex Conditional"}],"change-level":"warning","is-hotspot?":false,"line":514,"what-changed":"isRowGripSelected has 1 complex conditionals with 2 branches, threshold = 2","how-to-fix":"Apply the [DECOMPOSE CONDITIONAL](https://refactoring.com/catalog/decomposeConditional.html) refactoring so that the complex conditional is encapsulated in a separate function with a good name that captures the business rule. Optionally, for simple expressions, introduce a new variable which holds the result of the complex conditional.","change-type":"introduced"}]},"positive-impact-count":0,"repo":"Umbraco-CMS","code-health":9.634522258531705,"version":"3.0","authors":["leekelleher"],"directives":{"added":[],"removed":[]},"positive-findings":{"number-of-types":0,"number-of-files-touched":0,"findings":[]},"notices":{"number-of-types":0,"number-of-files-touched":0,"findings":[]},"external-review-provider":"GitHub"},"analysistime":"2025-09-24T15:42:01.000Z","project-name":"Umbraco-CMS","repository":"https://github.com/umbraco/Umbraco-CMS.git"}}