{"results":{"result":{"added-files":{"code-health":10.0,"old-code-health":0.0,"files":[{"file":"src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-bulk-actions/move-to/repository/move-to.repository.test.ts","loc":72,"code-health":10.0},{"file":"tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentEditingServiceTests.CancellationToken.cs","loc":105,"code-health":10.0},{"file":"tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/MediaEditingServiceTests.CancellationToken.cs","loc":20,"code-health":10.0}]},"external-review-url":"https://github.com/umbraco/Umbraco-CMS/pull/23701","old-code-health":6.102321721512905,"modified-files":{"code-health":6.192817959868758,"old-code-health":6.102321721512905,"files":[{"file":"src/Umbraco.Cms.Api.Management/Controllers/Document/CopyDocumentController.cs","loc":66,"old-loc":65,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Cms.Api.Management/Controllers/Document/MoveDocumentController.cs","loc":61,"old-loc":60,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Cms.Api.Management/Controllers/Document/MoveToRecycleBinDocumentController.cs","loc":53,"old-loc":53,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Cms.Api.Management/Controllers/Document/RecycleBin/RestoreDocumentRecycleBinController.cs","loc":63,"old-loc":62,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Cms.Api.Management/Controllers/Media/MoveMediaController.cs","loc":59,"old-loc":58,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Cms.Api.Management/Controllers/Media/MoveToRecycleBinMediaController.cs","loc":52,"old-loc":52,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Cms.Api.Management/Controllers/Media/RecycleBin/RestoreMediaRecycleBinController.cs","loc":65,"old-loc":64,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Core/Services/ContentBlueprintEditingService.cs","loc":208,"old-loc":207,"code-health":9.096655465156704,"old-code-health":9.096655465156704},{"file":"src/Umbraco.Core/Services/ContentEditingService.cs","loc":362,"old-loc":349,"code-health":8.56135850160195,"old-code-health":8.56135850160195},{"file":"src/Umbraco.Core/Services/ContentEditingServiceBase.cs","loc":478,"old-loc":474,"code-health":6.690924517213949,"old-code-health":6.690924517213949},{"file":"src/Umbraco.Core/Services/ContentService.cs","loc":2880,"old-loc":2859,"code-health":2.300800341683038,"old-code-health":2.302452472531444},{"file":"src/Umbraco.Core/Services/IContentEditingService.cs","loc":54,"old-loc":36,"code-health":9.096655465156704,"old-code-health":9.6882083290695},{"file":"src/Umbraco.Core/Services/IContentService.cs","loc":156,"old-loc":140,"code-health":9.387218218812514,"old-code-health":9.387218218812514},{"file":"src/Umbraco.Core/Services/IMediaEditingService.cs","loc":45,"old-loc":32,"code-health":9.6882083290695,"old-code-health":10.0},{"file":"src/Umbraco.Core/Services/IMediaService.cs","loc":89,"old-loc":78,"code-health":9.6882083290695,"old-code-health":10.0},{"file":"src/Umbraco.Core/Services/MediaEditingService.cs","loc":174,"old-loc":165,"code-health":9.096655465156704,"old-code-health":9.096655465156704},{"file":"src/Umbraco.Core/Services/MediaService.cs","loc":1087,"old-loc":1075,"code-health":6.895153375127571,"old-code-health":6.895153375127571},{"file":"src/Umbraco.Core/Services/MemberContentEditingService.cs","loc":122,"old-loc":121,"code-health":9.096655465156704,"old-code-health":9.096655465156704},{"file":"src/Umbraco.Web.UI.Client/src/packages/core/entity-bulk-action/common/bulk-tree-picker-action.controller.ts","loc":58,"old-loc":58,"code-health":9.6882083290695,"old-code-health":9.6882083290695},{"file":"src/Umbraco.Web.UI.Client/src/packages/core/entity-bulk-action/common/duplicate-to/duplicate-to.action.ts","loc":34,"old-loc":31,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/core/entity-bulk-action/common/move-to/move-to.action.ts","loc":34,"old-loc":31,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/core/entity-bulk-action/progress/entity-bulk-action-progress-modal.element.ts","loc":65,"old-loc":57,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/core/entity-bulk-action/progress/entity-bulk-action-progress.controller.test.ts","loc":237,"old-loc":174,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/core/entity-bulk-action/progress/entity-bulk-action-progress.controller.ts","loc":91,"old-loc":83,"code-health":9.6882083290695,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/core/recycle-bin/entity-action/trash/trash.action.ts","loc":69,"old-loc":65,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/core/recycle-bin/entity-bulk-action/bulk-trash/bulk-trash.action.ts","loc":110,"old-loc":102,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/core/recycle-bin/recycle-bin-repository-base.ts","loc":50,"old-loc":47,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/core/tree/entity-actions/duplicate-to/duplicate-to.action.ts","loc":71,"old-loc":66,"code-health":9.608927141875917,"old-code-health":9.608927141875917},{"file":"src/Umbraco.Web.UI.Client/src/packages/core/tree/entity-actions/move/move-to.action.ts","loc":83,"old-loc":78,"code-health":9.608927141875917,"old-code-health":9.608927141875917},{"file":"src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-actions/duplicate/duplicate-document.action.ts","loc":100,"old-loc":92,"code-health":9.663736664415227,"old-code-health":9.663736664415227},{"file":"src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-actions/duplicate/repository/document-duplicate.repository.ts","loc":20,"old-loc":20,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-actions/duplicate/repository/document-duplicate.server.data-source.ts","loc":31,"old-loc":27,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-actions/move-to/repository/document-move.repository.ts","loc":20,"old-loc":20,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-actions/move-to/repository/document-move.server.data-source.ts","loc":26,"old-loc":25,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-bulk-actions/duplicate-to/repository/duplicate-to.repository.ts","loc":41,"old-loc":33,"code-health":9.6882083290695,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-bulk-actions/move-to/repository/move-to.repository.ts","loc":33,"old-loc":28,"code-health":9.6882083290695,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/documents/documents/recycle-bin/repository/document-recycle-bin.server.data-source.ts","loc":46,"old-loc":43,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/media/media/entity-actions/move-to/repository/media-move.repository.ts","loc":20,"old-loc":20,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/media/media/entity-actions/move-to/repository/media-move.server.data-source.ts","loc":25,"old-loc":24,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/media/media/entity-bulk-actions/move-to/repository/move-to.repository.ts","loc":33,"old-loc":28,"code-health":9.6882083290695,"old-code-health":10.0},{"file":"src/Umbraco.Web.UI.Client/src/packages/media/media/recycle-bin/repository/media-recycle-bin.server.data-source.ts","loc":46,"old-loc":43,"code-health":10.0,"old-code-health":10.0},{"file":"tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentEditingServiceTests.cs","loc":60,"old-loc":55,"code-health":10.0,"old-code-health":10.0}]},"removed-files":{"code-health":0.0,"old-code-health":0.0,"files":[]},"external-review-id":"23701","analysis-time":"2026-08-20T15:37:29Z","negative-impact-count":9,"suppressions":{"number-of-types":0,"number-of-files-touched":0,"findings":[]},"affected-hotspots":1,"commits":["26db0546a7a993daf93827775516b0793451705e","bc6ee8fb52187a3ec9cbe98253ebdb327f34d741"],"is-negative-review":true,"negative-findings":{"number-of-types":4,"number-of-files-touched":8,"findings":[{"method":"Copy","why-it-occurs":"A Complex Method has a high cyclomatic complexity. The recommended threshold for the C# language is a cyclomatic complexity lower than 9.","name":"Complex Method","file":"src/Umbraco.Core/Services/ContentService.cs","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":"c#","improvement-type":"Complex Method"}],"change-level":"warning","is-hotspot?":true,"line":3244,"what-changed":"Copy already has high cyclomatic complexity, and now it increases in Lines of Code from 85 to 87","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":"degraded"},{"why-it-occurs":"This code health issue is measured as the average number of function arguments across the whole file. A function with many arguments can be simplified either by a) splitting the function if it has too many responsibilities, or b) by introducing an abstraction (class, record, struct, etc.) which encapsulates the arguments. ","name":"Missing Arguments Abstractions","file":"src/Umbraco.Core/Services/IContentEditingService.cs","refactoring-examples":null,"change-level":"warning","is-hotspot?":false,"what-changed":"The average number of function arguments in this module is 4.25 across 8 functions. The average arguments threshold is 4.00","how-to-fix":"Start by investigating the responsibilities of the function. Make sure it doesn't do too many things, in which case it should be split into smaller and more cohesive functions. Consider the refactoring [INTRODUCE PARAMETER OBJECT](https://refactoring.com/catalog/introduceParameterObject.html) to encapsulate arguments that refer to the same logical concept.","change-type":"introduced"},{"why-it-occurs":"Code that uses a high degree of built-in, primitives such as integers, strings, floats, lacks a domain language that encapsulates the validation and semantics of function arguments. Primitive Obsession has several consequences: 1) In a statically typed language, the compiler will detect less erroneous assignments. 2) Security impact since the possible value range of a variable/argument isn't retricted.\n\nIn this module, 76 % of all functions have primitive types as arguments.","name":"Primitive Obsession","file":"src/Umbraco.Core/Services/IContentEditingService.cs","refactoring-examples":[{"diff":"diff --git a/primitive-obsession.ts b/primitive-obsession.ts\nindex 38bae186cc..24116eddcc 100644\n--- a/primitive-obsession.ts\n+++ b/primitive-obsession.ts\n@@ -1,8 +1,8 @@\n-// Problem: It's hard to know what this function does, and what values are valid as parameters.\n-function getPopularRepositories(String baseURL, String query, Integer pages, Integer pageSize, String sortorder): Json {\n-\tlet pages == null ? 10 : pages\n-\tlet pageSize == null ? 10 : pageSize\n-  return httpClient.get(`${baseURL}?q=${query}&pages=${pages}&pageSize=${pageSize}&sortorder=${sortorder}`)\n+// Refactoring: extract the pagination & API logic into a class, and it will\n+// attract validation and other logic related to the specific query. It's now\n+// easier to use and to maintain the getPopularRepositories function!\n+function getPopularRepositories(query: PaginatedRepoQuery): Json {\n+  return httpClient.get(query.getURL())\n     .map(json => json.repositories)\n     .filter(repository => repositry.stargazersCount > 1000)\n }\n","language":"c#","improvement-type":"Primitive Obsession"}],"change-level":"warning","is-hotspot?":false,"what-changed":"In this module, 76.5% of all function arguments are primitive types, threshold = 30.0%","how-to-fix":"Primitive Obsession indicates a missing domain language. Introduce data types that encapsulate the details and constraints of your domain. For example, instead of `int userId`, consider `User clicked`.","change-type":"introduced"},{"method":"RestoreAsync","why-it-occurs":"Functions with many arguments indicate either a) low cohesion where the function has too many responsibilities, or b) a missing abstraction that encapsulates those arguments.\n\nThe threshold for the C# language is 4 function arguments.","name":"Excess Number of Function Arguments","file":"src/Umbraco.Core/Services/IMediaEditingService.cs","refactoring-examples":null,"change-level":"warning","is-hotspot?":false,"line":252,"what-changed":"RestoreAsync has 5 arguments, max arguments = 4","how-to-fix":"Start by investigating the responsibilities of the function. Make sure it doesn't do too many things, in which case it should be split into smaller and more cohesive functions. Consider the refactoring [INTRODUCE PARAMETER OBJECT](https://refactoring.com/catalog/introduceParameterObject.html) to encapsulate arguments that refer to the same logical concept.","change-type":"introduced"},{"method":"Move","why-it-occurs":"Functions with many arguments indicate either a) low cohesion where the function has too many responsibilities, or b) a missing abstraction that encapsulates those arguments.\n\nThe threshold for the C# language is 4 function arguments.","name":"Excess Number of Function Arguments","file":"src/Umbraco.Core/Services/IMediaService.cs","refactoring-examples":null,"change-level":"warning","is-hotspot?":false,"line":241,"what-changed":"Move has 5 arguments, max arguments = 4","how-to-fix":"Start by investigating the responsibilities of the function. Make sure it doesn't do too many things, in which case it should be split into smaller and more cohesive functions. Consider the refactoring [INTRODUCE PARAMETER OBJECT](https://refactoring.com/catalog/introduceParameterObject.html) to encapsulate arguments that refer to the same logical concept.","change-type":"introduced"},{"method":"UmbEntityBulkActionProgressController.runWithProgress","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/core/entity-bulk-action/progress/entity-bulk-action-progress.controller.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":79,"what-changed":"UmbEntityBulkActionProgressController.runWithProgress 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":"UmbBulkDuplicateToDocumentRepository.requestBulkDuplicateTo","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/documents/documents/entity-bulk-actions/duplicate-to/repository/duplicate-to.repository.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":11,"what-changed":"UmbBulkDuplicateToDocumentRepository.requestBulkDuplicateTo has a cyclomatic complexity of 10, 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":"UmbBulkMoveToDocumentRepository.requestBulkMoveTo","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/documents/documents/entity-bulk-actions/move-to/repository/move-to.repository.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":10,"what-changed":"UmbBulkMoveToDocumentRepository.requestBulkMoveTo has a cyclomatic complexity of 10, 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":"UmbBulkMoveToMediaRepository.requestBulkMoveTo","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/media/media/entity-bulk-actions/move-to/repository/move-to.repository.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":10,"what-changed":"UmbBulkMoveToMediaRepository.requestBulkMoveTo has a cyclomatic complexity of 10, 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"}]},"positive-impact-count":7,"repo":"Umbraco-CMS","code-health":6.290552500122322,"version":"3.0","authors":["Laura Neto"],"directives":{"added":[],"removed":[]},"positive-findings":{"number-of-types":2,"number-of-files-touched":7,"findings":[{"name":"Primitive Obsession","file":"src/Umbraco.Core/Services/ContentBlueprintEditingService.cs","change-type":"improved","change-level":"improvement","is-hotspot?":false,"why-it-occurs":"Code that uses a high degree of built-in, primitives such as integers, strings, floats, lacks a domain language that encapsulates the validation and semantics of function arguments. Primitive Obsession has several consequences: 1) In a statically typed language, the compiler will detect less erroneous assignments. 2) Security impact since the possible value range of a variable/argument isn't retricted.\n\nIn this module, 51 % of all functions have primitive types as arguments.","how-to-fix":"Primitive Obsession indicates a missing domain language. Introduce data types that encapsulate the details and constraints of your domain. For example, instead of `int userId`, consider `User clicked`.","what-changed":"The ratio of primitive types in function arguments decreases from 54.55% to 50.85%, threshold = 30.0%"},{"name":"Primitive Obsession","file":"src/Umbraco.Core/Services/ContentEditingServiceBase.cs","change-type":"improved","change-level":"improvement","is-hotspot?":false,"why-it-occurs":"Code that uses a high degree of built-in, primitives such as integers, strings, floats, lacks a domain language that encapsulates the validation and semantics of function arguments. Primitive Obsession has several consequences: 1) In a statically typed language, the compiler will detect less erroneous assignments. 2) Security impact since the possible value range of a variable/argument isn't retricted.\n\nIn this module, 37 % of all functions have primitive types as arguments.","how-to-fix":"Primitive Obsession indicates a missing domain language. Introduce data types that encapsulate the details and constraints of your domain. For example, instead of `int userId`, consider `User clicked`.","what-changed":"The ratio of primitive types in function arguments decreases from 39.19% to 37.18%, threshold = 30.0%"},{"name":"Overall Code Complexity","file":"src/Umbraco.Core/Services/ContentService.cs","change-type":"improved","change-level":"improvement","is-hotspot?":true,"why-it-occurs":"Overall Code Complexity is measured by the mean cyclomatic complexity across all functions in the file. The lower the number, the better.\n\nCyclomatic complexity is a function level metric that measures the number of logical branches (if-else, loops, etc.). Cyclomatic complexity is a rough complexity measure, but useful as a way of estimating the minimum number of unit tests you would need. As such, prefer functions with low cyclomatic complexity (2-3 branches).","how-to-fix":"You address the overall cyclomatic complexity by a) modularizing the code, and b) abstract away the complexity. Let's look at some examples:\n\nModularizing the Code: Do an X-Ray and inspect the local hotspots. Are there any complex conditional expressions? If yes, then do a [DECOMPOSE CONDITIONAL](https://refactoring.com/catalog/decomposeConditional.html) refactoring. Extract the conditional logic into a separate function and put a good name on that function. This clarifies the intent and makes the original function easier to read. Repeat until all complex conditional expressions have been simplified.\n\n","what-changed":"The mean cyclomatic complexity decreases from 4.09 to 4.02, threshold = 4"},{"name":"Primitive Obsession","file":"src/Umbraco.Core/Services/IContentService.cs","change-type":"improved","change-level":"improvement","is-hotspot?":false,"why-it-occurs":"Code that uses a high degree of built-in, primitives such as integers, strings, floats, lacks a domain language that encapsulates the validation and semantics of function arguments. Primitive Obsession has several consequences: 1) In a statically typed language, the compiler will detect less erroneous assignments. 2) Security impact since the possible value range of a variable/argument isn't retricted.\n\nIn this module, 65 % of all functions have primitive types as arguments.","how-to-fix":"Primitive Obsession indicates a missing domain language. Introduce data types that encapsulate the details and constraints of your domain. For example, instead of `int userId`, consider `User clicked`.","what-changed":"The ratio of primitive types in function arguments decreases from 68.97% to 65.12%, threshold = 30.0%"},{"name":"Primitive Obsession","file":"src/Umbraco.Core/Services/MediaEditingService.cs","change-type":"improved","change-level":"improvement","is-hotspot?":false,"why-it-occurs":"Code that uses a high degree of built-in, primitives such as integers, strings, floats, lacks a domain language that encapsulates the validation and semantics of function arguments. Primitive Obsession has several consequences: 1) In a statically typed language, the compiler will detect less erroneous assignments. 2) Security impact since the possible value range of a variable/argument isn't retricted.\n\nIn this module, 60 % of all functions have primitive types as arguments.","how-to-fix":"Primitive Obsession indicates a missing domain language. Introduce data types that encapsulate the details and constraints of your domain. For example, instead of `int userId`, consider `User clicked`.","what-changed":"The ratio of primitive types in function arguments decreases from 60.56% to 59.77%, threshold = 30.0%"},{"name":"Primitive Obsession","file":"src/Umbraco.Core/Services/MediaService.cs","change-type":"improved","change-level":"improvement","is-hotspot?":false,"why-it-occurs":"Code that uses a high degree of built-in, primitives such as integers, strings, floats, lacks a domain language that encapsulates the validation and semantics of function arguments. Primitive Obsession has several consequences: 1) In a statically typed language, the compiler will detect less erroneous assignments. 2) Security impact since the possible value range of a variable/argument isn't retricted.\n\nIn this module, 54 % of all functions have primitive types as arguments.","how-to-fix":"Primitive Obsession indicates a missing domain language. Introduce data types that encapsulate the details and constraints of your domain. For example, instead of `int userId`, consider `User clicked`.","what-changed":"The ratio of primitive types in function arguments decreases from 54.15% to 53.74%, threshold = 30.0%"},{"name":"Primitive Obsession","file":"src/Umbraco.Core/Services/MemberContentEditingService.cs","change-type":"improved","change-level":"improvement","is-hotspot?":false,"why-it-occurs":"Code that uses a high degree of built-in, primitives such as integers, strings, floats, lacks a domain language that encapsulates the validation and semantics of function arguments. Primitive Obsession has several consequences: 1) In a statically typed language, the compiler will detect less erroneous assignments. 2) Security impact since the possible value range of a variable/argument isn't retricted.\n\nIn this module, 32 % of all functions have primitive types as arguments.","how-to-fix":"Primitive Obsession indicates a missing domain language. Introduce data types that encapsulate the details and constraints of your domain. For example, instead of `int userId`, consider `User clicked`.","what-changed":"The ratio of primitive types in function arguments decreases from 34.78% to 32.00%, threshold = 30.0%"}]},"notices":{"number-of-types":0,"number-of-files-touched":0,"findings":[]},"external-review-provider":"GitHub"},"analysistime":"2026-08-20T15:37:29.000Z","project-name":"Umbraco-CMS","repository":"https://github.com/umbraco/Umbraco-CMS.git"}}