{"results":{"result":{"added-files":{"code-health":0.0,"old-code-health":0.0,"files":[]},"external-review-url":"https://github.com/umbraco/Umbraco-CMS/pull/20723","old-code-health":9.073453631585457,"modified-files":{"code-health":9.03879196346858,"old-code-health":9.073453631585457,"files":[{"file":"src/Umbraco.Cms.Api.Management/Controllers/Help/GetHelpController.cs","loc":72,"old-loc":74,"code-health":9.6882083290695,"old-code-health":9.6882083290695},{"file":"src/Umbraco.Cms.Api.Management/Controllers/ModelsBuilder/BuildModelsBuilderController.cs","loc":54,"old-loc":59,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Cms.Api.Management/Factories/ModelsBuilderPresentationFactory.cs","loc":29,"old-loc":33,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Core/DeliveryApi/ApiPublishedContentCache.cs","loc":105,"old-loc":108,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Infrastructure/PropertyEditors/FileUploadPropertyValueEditor.cs","loc":142,"old-loc":139,"code-health":9.022772285419025,"old-code-health":9.022772285419025},{"file":"src/Umbraco.Infrastructure/PropertyEditors/ImageCropperPropertyEditor.cs","loc":242,"old-loc":244,"code-health":8.413528317237752,"old-code-health":8.413528317237752},{"file":"src/Umbraco.Infrastructure/PropertyEditors/ImageCropperPropertyValueEditor.cs","loc":192,"old-loc":190,"code-health":8.513522969974634,"old-code-health":8.513522969974634},{"file":"src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/RteBlockRenderingValueConverter.cs","loc":197,"old-loc":195,"code-health":8.413528317237752,"old-code-health":8.413528317237752},{"file":"src/Umbraco.Infrastructure/Search/IndexingNotificationHandler.DeliveryApi.cs","loc":80,"old-loc":81,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Infrastructure/Security/EmailUserForgotPasswordSender.cs","loc":57,"old-loc":59,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Core/Cache/ValueEditorCache.cs","loc":53,"old-loc":46,"code-health":9.387218218812514,"old-code-health":10.0}]},"removed-files":{"code-health":0.0,"old-code-health":0.0,"files":[]},"external-review-id":"20723","analysis-time":"2025-11-06T14:35:43Z","negative-impact-count":1,"suppressions":{"number-of-types":0,"number-of-files-touched":0,"findings":[]},"affected-hotspots":0,"commits":["6bb74d4c75f7eef0398ee6aed659cc129936cc46","27d92e80e8b9bcdbd3171843dcab8c0446fafae1","df95535d9745ed7adf40581678377813669f00cf","287b11a92cc33ff5520eccd4737b1c775f20af30","612f3b549db7e4d2d0bb0f1b713293dcf5bf788c","8ad6b37c93dc19ac47d923323aaac78c41d4806c"],"is-negative-review":true,"negative-findings":{"number-of-types":1,"number-of-files-touched":1,"findings":[{"method":"ClearCache","why-it-occurs":"Deep nested logic means that you have control structures like if-statements or loops inside other control structures. Deep nested logic increases the cognitive load on the programmer reading the code. The human working memory has a maximum capacity of 3-4 items; beyond that threshold, we struggle with keeping things in our head. Consequently, deep nested logic has a strong correlation to defects and accounts for roughly 20% of all programming mistakes.\n\nCodeScene measures the maximum nesting depth inside each function. The deeper the nesting, the lower the code health. The threshold for the C# language is 4 levels of nesting.","name":"Deep, Nested Complexity","file":"src/Umbraco.Core/Cache/ValueEditorCache.cs","refactoring-examples":null,"change-level":"warning","is-hotspot?":false,"line":44,"what-changed":"ClearCache has a nested complexity depth of 4, threshold = 4","how-to-fix":"Occassionally, it's possible to get rid of the nested logic by [Replacing Conditionals with Guard Clauses](https://refactoring.com/catalog/replaceNestedConditionalWithGuardClauses.html).\n\nAnother viable strategy is to identify smaller building blocks inside the nested chunks of logic and extract those responsibilities into smaller, cohesive, and well-named functions. The [EXTRACT FUNCTION](https://refactoring.com/catalog/extractFunction.html) refactoring explains the steps.","change-type":"introduced"}]},"positive-impact-count":1,"repo":"Umbraco-CMS","code-health":9.03879196346858,"version":"3.0","authors":["Andy Butland"],"directives":{"added":[],"removed":[]},"positive-findings":{"number-of-types":1,"number-of-files-touched":1,"findings":[{"name":"Overall Code Complexity","file":"src/Umbraco.Infrastructure/PropertyEditors/ImageCropperPropertyValueEditor.cs","change-type":"improved","change-level":"improvement","is-hotspot?":false,"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.75 to 4.33, threshold = 4"}]},"notices":{"number-of-types":0,"number-of-files-touched":0,"findings":[]},"external-review-provider":"GitHub"},"analysistime":"2025-11-06T14:35:42.000Z","project-name":"Umbraco-CMS","repository":"https://github.com/umbraco/Umbraco-CMS.git"}}