aws-samples / dotnet-modernization-music-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 38 units with 806 lines of code in units (21.8% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 0 medium complex units (0 lines of code)
    • 2 simple units (51 lines of code)
    • 36 very simple units (755 lines of code)
0% | 0% | 0% | 6% | 93%
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% | 0% | 6% | 93%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
MvcMusicStore/Controllers0% | 0% | 0% | 20% | 79%
MvcMusicStore/Models0% | 0% | 0% | 0% | 100%
MvcMusicStore0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
private static string ErrorCodeToString()
in MvcMusicStore/Controllers/AccountController.cs
26 10 1
public ActionResult LogOn()
in MvcMusicStore/Controllers/AccountController.cs
25 8 2
public ActionResult ChangePassword()
in MvcMusicStore/Controllers/AccountController.cs
25 4 1
public int RemoveFromCart()
in MvcMusicStore/Models/ShoppingCart.cs
21 4 1
public ActionResult Register()
in MvcMusicStore/Controllers/AccountController.cs
19 3 1
public ActionResult AddressAndPayment()
in MvcMusicStore/Controllers/CheckoutController.cs
28 3 1
public ActionResult Complete()
in MvcMusicStore/Controllers/CheckoutController.cs
14 3 1
public void AddToCart()
in MvcMusicStore/Models/ShoppingCart.cs
22 3 1
public string GetCartId()
in MvcMusicStore/Models/ShoppingCart.cs
16 3 1
public void EmptyCart()
in MvcMusicStore/Models/ShoppingCart.cs
9 2 0
public int CreateOrder()
in MvcMusicStore/Models/ShoppingCart.cs
21 2 1
public void MigrateCart()
in MvcMusicStore/Models/ShoppingCart.cs
9 2 1
public static void RegisterGlobalFilters()
in MvcMusicStore/Global.asax.cs
4 1 1
public static void RegisterRoutes()
in MvcMusicStore/Global.asax.cs
9 1 1
protected void Application_Start()
in MvcMusicStore/Global.asax.cs
7 1 0
private void MigrateShoppingCart()
in MvcMusicStore/Controllers/AccountController.cs
6 1 1
public ActionResult LogOn()
in MvcMusicStore/Controllers/AccountController.cs
4 1 0
public ActionResult LogOff()
in MvcMusicStore/Controllers/AccountController.cs
6 1 0
public ActionResult Register()
in MvcMusicStore/Controllers/AccountController.cs
4 1 0
public ActionResult ChangePassword()
in MvcMusicStore/Controllers/AccountController.cs
4 1 0