aws-samples / modernization-unicorn-store
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 111 units with 1,507 lines of code in units (35.8% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (55 lines of code)
    • 2 medium complex units (60 lines of code)
    • 5 simple units (144 lines of code)
    • 103 very simple units (1,248 lines of code)
0% | 3% | 3% | 9% | 82%
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
js0% | 26% | 29% | 19% | 24%
cs0% | 0% | 0% | 7% | 92%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
UnicornStore/wwwroot0% | 26% | 29% | 19% | 24%
UnicornStore/Controllers0% | 0% | 0% | 13% | 86%
UnicornStore0% | 0% | 0% | 0% | 100%
UnicornStore/Areas0% | 0% | 0% | 0% | 100%
UnicornStore/Models0% | 0% | 0% | 0% | 100%
UnicornStore/Data0% | 0% | 0% | 0% | 100%
UnicornStore/Components0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
applyMedia = function()
in UnicornStore/wwwroot/Scripts/respond.js
55 27 1
translate = function()
in UnicornStore/wwwroot/Scripts/respond.js
33 17 3
ripCSS = function()
in UnicornStore/wwwroot/Scripts/respond.js
27 11 0
(function( win )()
in UnicornStore/wwwroot/Scripts/respond.js
40 7 1
public async Task ExternalLoginConfirmation()
in UnicornStore/Controllers/AccountController.cs
34 7 2
public async Task Index()
in UnicornStore/Controllers/ManageController.cs
21 7 1
public async Task SendCode()
in UnicornStore/Controllers/AccountController.cs
27 6 1
public async Task ManageLogins()
in UnicornStore/Controllers/ManageController.cs
22 6 1
public async Task Details()
in UnicornStore/Areas/Admin/Controllers/StoreManagerController.cs
31 5 2
public async Task Login()
in UnicornStore/Controllers/AccountController.cs
27 5 2
public async Task ConfirmEmail()
in UnicornStore/Controllers/AccountController.cs
14 5 2
public async Task ExternalLoginCallback()
in UnicornStore/Controllers/AccountController.cs
28 5 1
public async Task Index()
in UnicornStore/Controllers/HomeController.cs
24 5 2
public async Task Details()
in UnicornStore/Controllers/StoreController.cs
30 5 2
private static async Task CreateAdminUser()
in UnicornStore/Data/DbInitializer.cs
26 5 2
req.onreadystatechange = function()
in UnicornStore/wwwroot/Scripts/respond.js
6 4 0
public async Task VerifyCode()
in UnicornStore/Controllers/AccountController.cs
21 4 1
public async Task ForgotPassword()
in UnicornStore/Controllers/AccountController.cs
23 4 1
public async Task ResetPassword()
in UnicornStore/Controllers/AccountController.cs
19 4 1
public async Task AddressAndPayment()
in UnicornStore/Controllers/CheckoutController.cs
36 4 3