aws-samples / dotnet-serverless-imagerecognition
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 158 units with 1,944 lines of code in units (38.0% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (75 lines of code)
    • 5 simple units (168 lines of code)
    • 152 very simple units (1,701 lines of code)
0% | 0% | 3% | 8% | 87%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
cs0% | 0% | 3% | 8% | 87%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
StepFunctions/Common0% | 0% | 46% | 0% | 53%
Utils0% | 0% | 0% | 61% | 38%
UI/Blazor0% | 0% | 0% | 5% | 94%
UI/mvc-frontend0% | 0% | 0% | 7% | 92%
Communication/ImageRecognition.Communication.Functions0% | 0% | 0% | 19% | 80%
API/ImageRecognition.API0% | 0% | 0% | 0% | 100%
s3Trigger0% | 0% | 0% | 0% | 100%
StepFunctions/thumbnail0% | 0% | 0% | 0% | 100%
StepFunctions/transform-metadata0% | 0% | 0% | 0% | 100%
StepFunctions/store-image-metadata0% | 0% | 0% | 0% | 100%
StepFunctions/extract-image-metadata0% | 0% | 0% | 0% | 100%
Clients/ImageRecognition.API.Client.Generator0% | 0% | 0% | 0% | 100%
StepFunctions/rekognition0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
public async Task SendMessage()
in Application/StepFunctions/Common/CommunicationManager.cs
75 11 1
public async Task OnPostAsync()
in Application/UI/Blazor/ImageRecognition/Areas/Identity/Pages/Account/Login.cshtml.cs
33 8 1
public async Task OnPostAsync()
in Application/UI/mvc-frontend/ImageRecognition/Areas/Identity/Pages/Account/Login.cshtml.cs
33 8 1
private static string ReadSecretLine()
in Application/Utils/ConsoleUtilties.cs
27 7 0
public string ValidateAndGetUsername()
in Application/Communication/ImageRecognition.Communication.Functions/Functions.cs
30 6 2
public async Task ExecuteAsync()
in Application/Utils/LoginProcessor.cs
45 6 0
public async Task UploadFileAsync()
in Application/UI/Blazor/ImageRecognition/FileUploader.cs
107 5 2
public async Task OnPostAsync()
in Application/UI/Blazor/ImageRecognition/Areas/Identity/Pages/Account/Register.cshtml.cs
23 5 1
public async Task OnPostAsync()
in Application/UI/Blazor/ImageRecognition/Areas/Identity/Pages/Account/ResetPassword.cshtml.cs
16 5 1
public async Task OnPostAsync()
in Application/UI/Blazor/ImageRecognition/Areas/Identity/Pages/Account/ChangePassword.cshtml.cs
16 5 1
public async Task OnPostAsync()
in Application/UI/mvc-frontend/ImageRecognition/Areas/Identity/Pages/Account/ResetPassword.cshtml.cs
16 5 1
public async Task OnPostAsync()
in Application/UI/mvc-frontend/ImageRecognition/Areas/Identity/Pages/Account/ConfirmAccount.cshtml.cs
15 5 1
public async Task OnPostAsync()
in Application/UI/mvc-frontend/ImageRecognition/Areas/Identity/Pages/Account/ChangePassword.cshtml.cs
16 5 1
public async Task OnPostUploadAsync()
in Application/UI/mvc-frontend/ImageRecognition/Pages/Album.cshtml.cs
20 5 1
public async Task OnConnect()
in Application/Communication/ImageRecognition.Communication.Functions/Functions.cs
34 4 2
public static string MakeSafeName()
in Application/API/ImageRecognition.API/Utilities.cs
12 4 2
public static string MakeSafeName()
in Application/s3Trigger/Function.cs
12 4 2
private async Task ConstructHttpClient()
in Application/UI/Blazor/ImageRecognition/ServiceClientFactory.cs
17 4 0
public async Task CreateCommunicationClient()
in Application/UI/Blazor/ImageRecognition/CommunicationClientFactory.cs
17 4 1
public async Task OnPostAsync()
in Application/UI/Blazor/ImageRecognition/Areas/Identity/Pages/Account/ConfirmAccount.cshtml.cs
15 4 1