V14: Move towards get guid #15889
V14: Move towards get guid #15889
CodeScene PR Check
❌ Code Health Quality Gates: FAILED
- Declining Code Health: 2 findings(s) 🚩
- Improving Code Health: 8 findings(s) ✅
- Affected Hotspots: 1 files(s) 🔥
Details
🚩 Declining Code Health (highest to lowest):
- Complex Method ClaimsIdentityExtensions.cs: AddRequiredClaims
- Constructor Over-Injection AuditLogPresentationFactory.cs: AuditLogPresentationFactory
✅ Improving Code Health:
- Bumpy Road Ahead UserRepository.cs: PerformGet
- Complex Method NotificationService.cs: SendNotifications
- Primitive Obsession MemberService.cs
- String Heavy Function Arguments MemberService.cs
- Deep, Nested Complexity NotificationService.cs: SendNotifications
- Primitive Obsession UserService.cs 🔥
- Primitive Obsession UserRepository.cs
- Bumpy Road Ahead NotificationService.cs: SendNotifications
Annotations
Check notice on line 1 in src/Umbraco.Core/Services/MemberService.cs
codescene-delta-analysis / CodeScene Cloud Delta Analysis (v14/dev)
✅ Getting better: Primitive Obsession
The ratio of primitive types in function arguments decreases from 70.53% to 70.31%, threshold = 30.0%. The functions in this file have too many primitive types (e.g. int, double, float) in their function argument lists. Using many primitive types lead to the code smell Primitive Obsession. Avoid adding more primitive arguments.
Check notice on line 44 in src/Umbraco.Core/Services/MemberService.cs
codescene-delta-analysis / CodeScene Cloud Delta Analysis (v14/dev)
ℹ Getting worse: Constructor Over-Injection
MemberService increases from 8 to 9 arguments, threshold = 5. This constructor has too many arguments, indicating an object with low cohesion or missing function argument abstraction. Avoid adding more arguments.
Check notice on line 1 in src/Umbraco.Core/Services/MemberService.cs
codescene-delta-analysis / CodeScene Cloud Delta Analysis (v14/dev)
✅ Getting better: String Heavy Function Arguments
The ratio of strings in function arguments decreases from 45.26% to 44.79%, threshold = 39.0%. The functions in this file have a high ratio of strings as arguments. Avoid adding more.
Check warning on line 29 in src/Umbraco.Cms.Api.Management/Factories/AuditLogPresentationFactory.cs
codescene-delta-analysis / CodeScene Cloud Delta Analysis (v14/dev)
❌ New issue: Constructor Over-Injection
AuditLogPresentationFactory has 6 arguments, threshold = 5. This constructor has too many arguments, indicating an object with low cohesion or missing function argument abstraction. Avoid adding more arguments.
Check notice on line 131 in src/Umbraco.Core/Services/NotificationService.cs
codescene-delta-analysis / CodeScene Cloud Delta Analysis (v14/dev)
✅ Getting better: Complex Method
SendNotifications decreases in cyclomatic complexity from 12 to 10, threshold = 9. 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 131 in src/Umbraco.Core/Services/NotificationService.cs
codescene-delta-analysis / CodeScene Cloud Delta Analysis (v14/dev)
✅ No longer an issue: Bumpy Road Ahead
SendNotifications is no longer above the threshold for logical blocks with deeply nested code. The Bumpy Road code smell is a function that contains multiple chunks of nested conditional logic. The deeper the nesting and the more bumps, the lower the code health.
Check notice on line 131 in src/Umbraco.Core/Services/NotificationService.cs
codescene-delta-analysis / CodeScene Cloud Delta Analysis (v14/dev)
✅ No longer an issue: Deep, Nested Complexity
SendNotifications is no longer above the threshold for nested complexity depth. This function contains deeply nested logic such as if statements and/or loops. The deeper the nesting, the lower the code health.
Check notice on line 1 in src/Umbraco.Core/Services/UserService.cs
codescene-delta-analysis / CodeScene Cloud Delta Analysis (v14/dev)
ℹ Getting worse: Lines of Code in a Single File
The lines of code increases from 1674 to 1719, improve code health by reducing it to 1000. The number of Lines of Code in a single file. More Lines of Code lowers the code health.
Check notice on line 133 in src/Umbraco.Core/Services/UserService.cs
codescene-delta-analysis / CodeScene Cloud Delta Analysis (v14/dev)
ℹ New issue: Constructor Over-Injection
UserService has 19 arguments, threshold = 5. This constructor has too many arguments, indicating an object with low cohesion or missing function argument abstraction. Avoid adding more arguments.
Check notice on line 1 in src/Umbraco.Core/Services/UserService.cs
codescene-delta-analysis / CodeScene Cloud Delta Analysis (v14/dev)
✅ Getting better: Primitive Obsession
The ratio of primitive types in function arguments decreases from 53.47% to 48.40%, threshold = 30.0%. The functions in this file have too many primitive types (e.g. int, double, float) in their function argument lists. Using many primitive types lead to the code smell Primitive Obsession. Avoid adding more primitive arguments.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (v14/dev)
✅ No longer an issue: Bumpy Road Ahead
PerformGet is no longer above the threshold for logical blocks with deeply nested code. The Bumpy Road code smell is a function that contains multiple chunks of nested conditional logic. The deeper the nesting and the more bumps, the lower the code health.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (v14/dev)
✅ Getting better: Primitive Obsession
The ratio of primitive types in function arguments decreases from 48.68% to 47.37%, threshold = 30.0%. The functions in this file have too many primitive types (e.g. int, double, float) in their function argument lists. Using many primitive types lead to the code smell Primitive Obsession. Avoid adding more primitive arguments.
Check notice on line 1 in src/Umbraco.Infrastructure/Security/BackOfficeUserStore.cs
codescene-delta-analysis / CodeScene Cloud Delta Analysis (v14/dev)
ℹ Getting worse: Overall Code Complexity
The mean cyclomatic complexity increases from 4.41 to 4.44, threshold = 4. This file has many conditional statements (e.g. if, for, while) across its implementation, leading to lower code health. Avoid adding more conditionals.
Check warning on line 226 in src/Umbraco.Core/Extensions/ClaimsIdentityExtensions.cs
codescene-delta-analysis / CodeScene Cloud Delta Analysis (v14/dev)
❌ Getting worse: Complex Method
AddRequiredClaims increases in cyclomatic complexity from 18 to 19, threshold = 9. 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 226 in src/Umbraco.Core/Extensions/ClaimsIdentityExtensions.cs
codescene-delta-analysis / CodeScene Cloud Delta Analysis (v14/dev)
ℹ Getting worse: Excess Number of Function Arguments
AddRequiredClaims increases from 10 to 11 arguments, threshold = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.