{"results":{"result":{"added-files":{"code-health":0.0,"old-code-health":0.0,"files":[]},"external-review-url":"https://github.com/umbraco/Umbraco-CMS/pull/22678","old-code-health":6.534116371329657,"modified-files":{"code-health":7.290408046550767,"old-code-health":6.534116371329657,"files":[{"file":"src/Umbraco.Core/Services/IMemberService.cs","loc":62,"old-loc":73,"code-health":9.6882083290695,"old-code-health":9.6882083290695},{"file":"src/Umbraco.Core/Services/MemberService.cs","loc":810,"old-loc":899,"code-health":7.552876135642913,"old-code-health":6.609249902897503},{"file":"tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/MemberServiceTests.cs","loc":914,"old-loc":1291,"code-health":6.895153375127571,"old-code-health":6.30344731029596}]},"removed-files":{"code-health":0.0,"old-code-health":0.0,"files":[]},"external-review-id":"22678","analysis-time":"2026-05-04T14:15:57Z","negative-impact-count":0,"suppressions":{"number-of-types":0,"number-of-files-touched":0,"findings":[]},"affected-hotspots":0,"commits":["0ea741f61f496183475474526d0dd26809e6a09a","e2d5410c8a9d451e6b3b9369eef377db93a3b75d"],"is-negative-review":false,"negative-findings":{"number-of-types":0,"number-of-files-touched":0,"findings":[]},"positive-impact-count":9,"repo":"Umbraco-CMS","code-health":7.290408046550767,"version":"3.0","authors":["Andy Butland"],"directives":{"added":[],"removed":[]},"positive-findings":{"number-of-types":6,"number-of-files-touched":2,"findings":[{"name":"Code Duplication","file":"src/Umbraco.Core/Services/MemberService.cs","change-type":"improved","change-level":"improvement","is-hotspot?":false,"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.","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.","what-changed":"reduced similar code in: GetMembersByPropertyValue,GetMembersByPropertyValue"},{"method":"GetMembersByPropertyValue","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/MemberService.cs","change-level":"improvement","is-hotspot?":false,"line":727,"what-changed":"GetMembersByPropertyValue is no longer above the threshold for cyclomatic complexity","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":"fixed"},{"method":"GetMembersByPropertyValue","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/MemberService.cs","change-level":"improvement","is-hotspot?":false,"line":799,"what-changed":"GetMembersByPropertyValue is no longer above the threshold for cyclomatic complexity","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":"fixed"},{"method":"GetMembersByPropertyValue","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/MemberService.cs","change-level":"improvement","is-hotspot?":false,"line":756,"what-changed":"GetMembersByPropertyValue is no longer above the threshold for cyclomatic complexity","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":"fixed"},{"name":"String Heavy Function Arguments","file":"src/Umbraco.Core/Services/MemberService.cs","change-type":"improved","change-level":"improvement","is-hotspot?":false,"why-it-occurs":"String is a generic type that fail to capture the constraints of the domain object it represents. In this module, 44 % of all function arguments are string types.","how-to-fix":"Heavy string usage indicates a missing domain language. Introduce data types that encapsulate the semantics. For example, a user_name is better represented as a constrained User type rather than a pure string, which could be anything.","what-changed":"The ratio of strings in function arguments decreases from 44.14% to 44.08%, threshold = 39.0%"},{"name":"Lines of Code in a Single File","file":"tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/MemberServiceTests.cs","change-type":"fixed","change-level":"improvement","is-hotspot?":false,"why-it-occurs":"This module has 884 lines of code (comments stripped away). This puts the module at risk of evolving into a Brain Class. Brain Classes are problematic since changes become more complex over time, harder to test, and challenging to refactor. Act now to prevent future maintenance issues.","how-to-fix":"Look for opportunities to modularize the design. This is done by identifying groups of functions that represent different responsibilities and/or operate on different data. Once you have identified the different responsibilities, then use refactorings like [EXTRACT CLASS](https://refactoring.com/catalog/extractClass.html).","what-changed":"The lines of code in this module is no longer above the threshold"},{"name":"Number of Functions in a Single Module","file":"tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/MemberServiceTests.cs","change-type":"fixed","change-level":"improvement","is-hotspot?":false,"what-changed":"The number of functions in this module is no longer above the threshold"},{"name":"Low Cohesion","file":"tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/MemberServiceTests.cs","change-type":"improved","change-level":"improvement","is-hotspot?":false,"why-it-occurs":"Cohesion is a measure of how well the elements in a file belong together. CodeScene measures cohesion using the LCOM4 metric (Lack of Cohesion Measure). With LCOM4, the functions inside a module are related if a) they access the same data members, or b) they call each other. High Cohesion is desirable as it means that all functions are related and likely to represent the same responsibility. Low Cohesion is problematic since it means that the module contains multiple behaviors. Low Cohesion leads to code that's harder to understand, requires more tests, and very often become a coordination magnet for developers.","how-to-fix":"Look to modularize the code by splitting the file into more cohesive units; functions that belong together should still be located together. A common refactoring is [EXTRACT CLASS](https://refactoring.com/catalog/extractClass.html).","what-changed":"The number of different responsibilities decreases from 76 to 62, threshold = 3"},{"name":"Code Duplication","file":"tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/MemberServiceTests.cs","change-type":"improved","change-level":"improvement","is-hotspot?":false,"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.","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.","what-changed":"reduced similar code in: Get_By_Property_Date_Value_Exact,Get_By_Property_Date_Value_Greater_Than,Get_By_Property_Date_Value_Greater_Than_Equal_To,Get_By_Property_Date_Value_Less_Than and 10 more functions"}]},"notices":{"number-of-types":0,"number-of-files-touched":0,"findings":[]},"external-review-provider":"GitHub"},"analysistime":"2026-05-04T14:15:57.000Z","project-name":"Umbraco-CMS","repository":"https://github.com/umbraco/Umbraco-CMS.git"}}