aws-samples / legacy-cycle-store-mvc-app
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 24 units with 170 lines of code in units (8.3% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 0 medium size units (0 lines of code)
    • 1 small units (11 lines of code)
    • 23 very small units (159 lines of code)
0% | 0% | 0% | 6% | 93%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs0% | 0% | 0% | 6% | 93%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
AdventureWorksMVC/Business0% | 0% | 0% | 10% | 89%
AdventureWorksMVC/Controllers0% | 0% | 0% | 0% | 100%
AdventureWorksMVC/App_Start0% | 0% | 0% | 0% | 100%
AdventureWorksMVC0% | 0% | 0% | 0% | 100%
AdventureWorksMVC/Helpers0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
public static List GetProductWeightString()
in AdventureWorksMVC/Business/ProductManager.cs
11 2 1
public static List GetProductWeight()
in AdventureWorksMVC/Business/ProductManager.cs
10 2 1
public static string GetProductDesc()
in AdventureWorksMVC/Business/ProductManager.cs
10 2 1
public static void RegisterRoutes()
in AdventureWorksMVC/App_Start/RouteConfig.cs
9 1 1
public static Product GetProductByProductId()
in AdventureWorksMVC/Business/ProductManager.cs
9 1 2
public static List GetProductColor()
in AdventureWorksMVC/Business/ProductManager.cs
9 2 1
public static List GetProductSize()
in AdventureWorksMVC/Business/ProductManager.cs
9 2 1
public static void Register()
in AdventureWorksMVC/App_Start/WebApiConfig.cs
8 1 1
public static IQueryable GetProductByCategory()
in AdventureWorksMVC/Business/ProductManager.cs
8 1 1
protected void Application_Start()
in AdventureWorksMVC/Global.asax.cs
7 1 0
public static ProductCategory GetCategoryByName()
in AdventureWorksMVC/Business/CategoryManager.cs
7 1 1
public static ProductSubcategory GetProductSubcategoryByName()
in AdventureWorksMVC/Business/CategoryManager.cs
7 1 1
public static Product GetProductByName()
in AdventureWorksMVC/Business/ProductManager.cs
7 1 1
public static Product GetProductByProductId()
in AdventureWorksMVC/Business/ProductManager.cs
7 1 1
public ActionResult FooterLayout()
in AdventureWorksMVC/Controllers/SiteLayoutController.cs
6 1 0
public ActionResult ContentLayout()
in AdventureWorksMVC/Controllers/SiteLayoutController.cs
6 1 0
public static List GetMainCategories()
in AdventureWorksMVC/Business/CategoryManager.cs
6 1 0
public static string WebResource()
in AdventureWorksMVC/Helpers/WebResource.cs
5 1 3
public ActionResult HeaderLayout()
in AdventureWorksMVC/Controllers/SiteLayoutController.cs
5 1 0
public ActionResult Default()
in AdventureWorksMVC/Controllers/HomeController.cs
5 1 0