Code Tidy: Clean up further obsoleted code scheduled for removal in Umbraco 18 (IMemberService.GetMembersByPropertyValue)#22678
CodeScene PR Check
Quality Gate Passed
Code Health Improved
(2 files improve in Code Health)
Gates Passed
4 Quality Gates Passed
See analysis details in CodeScene
View Improvements
| File | Code Health Impact | Categories Improved |
|---|---|---|
| MemberService.cs | 6.61 → 7.55 | Code Duplication, Complex Method, String Heavy Function Arguments |
| MemberServiceTests.cs | 6.30 → 6.90 | Lines of Code in a Single File, Number of Functions in a Single Module, Low Cohesion, Code Duplication |
Quality Gate Profile: Clean Code Collective
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.
Details
✅ Improving Code Health:
- Low Cohesion MemberServiceTests.cs
- Code Duplication MemberServiceTests.cs
- Code Duplication MemberService.cs
- String Heavy Function Arguments MemberService.cs
- Complex Method MemberService.cs: GetMembersByPropertyValue
- Complex Method MemberService.cs: GetMembersByPropertyValue
- Complex Method MemberService.cs: GetMembersByPropertyValue
- Lines of Code in a Single File MemberServiceTests.cs
- Number of Functions in a Single Module MemberServiceTests.cs
Annotations
Check notice on line 1 in src/Umbraco.Core/Services/MemberService.cs
codescene-delta-analysis / CodeScene Code Health Review (v18/dev)
✅ Getting better: Code Duplication
reduced similar code in: GetMembersByPropertyValue,GetMembersByPropertyValue. Avoid duplicated, aka copy-pasted, code inside the module. More duplication lowers the code health.
Check notice on line 725 in src/Umbraco.Core/Services/MemberService.cs
codescene-delta-analysis / CodeScene Code Health Review (v18/dev)
✅ No longer an issue: Complex Method
GetMembersByPropertyValue is no longer above the threshold for cyclomatic complexity. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.
Check notice on line 725 in src/Umbraco.Core/Services/MemberService.cs
codescene-delta-analysis / CodeScene Code Health Review (v18/dev)
✅ No longer an issue: Complex Method
GetMembersByPropertyValue is no longer above the threshold for cyclomatic complexity. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.
Check notice on line 725 in src/Umbraco.Core/Services/MemberService.cs
codescene-delta-analysis / CodeScene Code Health Review (v18/dev)
✅ No longer an issue: Complex Method
GetMembersByPropertyValue is no longer above the threshold for cyclomatic complexity. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.
Check notice on line 1 in src/Umbraco.Core/Services/MemberService.cs
codescene-delta-analysis / CodeScene Code Health Review (v18/dev)
✅ Getting better: String Heavy Function Arguments
The ratio of strings in function arguments decreases from 44.14% to 44.08%, threshold = 39.0%. The functions in this file have a high ratio of strings as arguments. Avoid adding more.
codescene-delta-analysis / CodeScene Code Health Review (v18/dev)
✅ No longer an issue: Lines of Code in a Single File
The lines of code in this module is no longer above the threshold
codescene-delta-analysis / CodeScene Code Health Review (v18/dev)
✅ No longer an issue: Number of Functions in a Single Module
The number of functions in this module is no longer above the threshold
codescene-delta-analysis / CodeScene Code Health Review (v18/dev)
✅ Getting better: Low Cohesion
The number of different responsibilities decreases from 76 to 62, threshold = 3. Cohesion is calculated using the LCOM4 metric. Low cohesion means that the module/class has multiple unrelated responsibilities, doing too many things and breaking the Single Responsibility Principle.
codescene-delta-analysis / CodeScene Code Health Review (v18/dev)
✅ Getting better: Code Duplication
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. Avoid duplicated, aka copy-pasted, code inside the module. More duplication lowers the code health.