SimplCommerce
Unit Size

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 2,117 units with 22,546 lines of code in units (37.0% of code).
    • 2 very long units (280 lines of code)
    • 33 long units (2,156 lines of code)
    • 247 medium size units (7,130 lines of code)
    • 411 small units (6,197 lines of code)
    • 1,424 very small units (6,783 lines of code)
1% | 9% | 31% | 27% | 30%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
js2% | 3% | 29% | 19% | 44%
cs<1% | 12% | 32% | 30% | 24%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Logical Component
primary logical decomposition
Modules1% | 9% | 31% | 27% | 30%
SimplCommerce.WebHost0% | 17% | 51% | 22% | 8%
SimplCommerce.Infrastructure0% | 6% | 30% | 38% | 23%
Legend:
101+
51-100
21-50
11-20
1-10
modules logical decomposition
SimplCommerce.Module.Catalog6% | 9% | 34% | 25% | 24%
SimplCommerce.Module.Orders0% | 18% | 29% | 22% | 28%
SimplCommerce.Module.Core0% | 6% | 30% | 27% | 34%
SimplCommerce.Module.Pricing0% | 35% | 37% | 11% | 15%
SimplCommerce.Module.Reviews0% | 25% | 26% | 24% | 22%
SimplCommerce.Module.Cms0% | 5% | 36% | 29% | 28%
SimplCommerce.Module.Search0% | 32% | 14% | 31% | 21%
SimplCommerce.Module.WishList0% | 20% | 49% | 23% | 7%
SimplCommerce.Module.PaymentBraintree0% | 25% | 0% | 39% | 35%
SimplCommerce.Module.PaymentNganLuong0% | 18% | 8% | 39% | 33%
SimplCommerce.Module.PaymentCashfree0% | 29% | 12% | 26% | 32%
SimplCommerce.Module.PaymentStripe0% | 30% | 0% | 33% | 35%
SimplCommerce.Module.PaymentPaypalExpress0% | 20% | 17% | 30% | 31%
SimplCommerce.Module.News0% | 7% | 43% | 17% | 32%
SimplCommerce.Module.Inventory0% | 8% | 47% | 16% | 28%
SimplCommerce.Module.ShoppingCart0% | 8% | 31% | 34% | 25%
SimplCommerce.Module.Comments0% | 15% | 44% | 10% | 30%
SimplCommerce.Module.Shipments0% | 0% | 61% | 13% | 24%
SimplCommerce.Module.Tax0% | 0% | 34% | 37% | 27%
SimplCommerce.Module.Contacts0% | 0% | 33% | 37% | 29%
SimplCommerce.Module.Notifications0% | 0% | 16% | 27% | 56%
SimplCommerce.Module.Localization0% | 0% | 26% | 28% | 45%
SimplCommerce.Module.Vendors0% | 0% | 41% | 23% | 35%
SimplCommerce.Module.HangfireJobs0% | 0% | 37% | 22% | 40%
SimplCommerce.Module.PaymentMomo0% | 0% | 25% | 48% | 25%
SimplCommerce.Module.ProductComparison0% | 0% | 44% | 35% | 19%
SimplCommerce.Module.ShippingTableRate0% | 0% | 34% | 35% | 30%
SimplCommerce.Module.Payments0% | 0% | 22% | 26% | 50%
SimplCommerce.Module.ProductRecentlyViewed0% | 0% | 19% | 51% | 28%
SimplCommerce.Module.Shipping0% | 0% | 22% | 20% | 56%
SimplCommerce.Module.SampleData0% | 0% | 20% | 33% | 46%
SimplCommerce.Module.PaymentCoD0% | 0% | 13% | 33% | 52%
SimplCommerce.Module.EmailSenderSmtp0% | 0% | 47% | 0% | 52%
SimplCommerce.Module.SignalR0% | 0% | 0% | 33% | 66%
SimplCommerce.Module.ActivityLog0% | 0% | 0% | 43% | 56%
SimplCommerce.Module.StorageAmazonS30% | 0% | 0% | 59% | 40%
SimplCommerce.Module.StorageAzureBlob0% | 0% | 0% | 39% | 60%
SimplCommerce.Module.ShippingFree0% | 0% | 0% | 50% | 50%
SimplCommerce.Module.EmailSenderSendgrid0% | 0% | 0% | 46% | 53%
SimplCommerce.Module.StorageLocal0% | 0% | 0% | 0% | 100%
SimplCommerce.Module.DinkToPdf0% | 0% | 0% | 0% | 100%
SimplCommerce.Module.ShippingPrices0% | 0% | 0% | 0% | 100%
Legend:
101+
51-100
21-50
11-20
1-10
database tables logical decomposition
Legend:
101+
51-100
21-50
11-20
1-10
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
(function ()()
in src/Modules/SimplCommerce.Module.Catalog/wwwroot/admin/catalog.module.js
162 1 1
public async Task Get()
in src/Modules/SimplCommerce.Module.Catalog/Areas/Catalog/Controllers/ProductApiController.cs
118 8 1
public async Task Validate()
in src/Modules/SimplCommerce.Module.Pricing/Services/CouponService.cs
99 29 3
(function ()()
in src/Modules/SimplCommerce.Module.Core/wwwroot/admin/core.module.js
97 1 1
public static IServiceCollection AddCustomizedIdentity()
in src/SimplCommerce.WebHost/Extensions/ServiceCollectionExtensions.cs
79 7 2
public async Task Post()
in src/Modules/SimplCommerce.Module.Catalog/Areas/Catalog/Controllers/ProductApiController.cs
78 7 1
public void Build()
in src/Modules/SimplCommerce.Module.Core/Data/CoreCustomModelBuilder.cs
77 1 1
public async Task Put()
in src/Modules/SimplCommerce.Module.Catalog/Areas/Catalog/Controllers/ProductApiController.cs
76 12 2
private async Task AddOrDeleteProductVariation()
in src/Modules/SimplCommerce.Module.Catalog/Areas/Catalog/Controllers/ProductApiController.cs
75 10 3
(function ()()
in src/Modules/SimplCommerce.Module.Cms/wwwroot/admin/cms.module.js
72 1 1
public IActionResult CategoryDetail()
in src/Modules/SimplCommerce.Module.Catalog/Areas/Catalog/Controllers/CategoryController.cs
72 14 2
public IActionResult Index()
in src/Modules/SimplCommerce.Module.Search/Areas/Search/Controllers/SearchController.cs
71 17 1
public async Task OrderDetails()
in src/Modules/SimplCommerce.Module.Orders/Areas/Orders/Controllers/OrderController.cs
70 4 1
public async Task Get()
in src/Modules/SimplCommerce.Module.Orders/Areas/Orders/Controllers/OrderApiController.cs
70 5 1
public async Task AddItem()
in src/Modules/SimplCommerce.Module.WishList/Areas/WishList/Controllers/WishListController.cs
67 5 1
public async Task Put()
in src/Modules/SimplCommerce.Module.Pricing/Areas/Pricing/Controllers/CartRuleApiController.cs
66 9 2
public async Task Print()
in src/Modules/SimplCommerce.Module.Orders/Areas/Orders/Controllers/InvoiceApiController.cs
65 4 1
public async Task Charge()
in src/Modules/SimplCommerce.Module.PaymentBraintree/Areas/PaymentBraintree/Controllers/BraintreeController.cs
63 6 1
public async Task List()
in src/Modules/SimplCommerce.Module.Catalog/Areas/Catalog/Controllers/ProductApiController.cs
62 10 1
public async Task SubmitPayment()
in src/Modules/SimplCommerce.Module.PaymentNganLuong/Areas/PaymentNganLuong/Controllers/NganLuongController.cs
62 5 2
public IActionResult BrandDetail()
in src/Modules/SimplCommerce.Module.Catalog/Areas/Catalog/Controllers/BrandController.cs
61 12 2
public async Task Charge()
in src/Modules/SimplCommerce.Module.PaymentCashfree/Areas/PaymentCashfree/Controllers/CashfreeController.cs
61 5 1
public static string ExportCsv()
in src/SimplCommerce.Infrastructure/Helpers/CsvConverter.cs
59 9 3
public async Task Charge()
in src/Modules/SimplCommerce.Module.PaymentStripe/Areas/PaymentStripe/Controllers/StripeController.cs
58 5 2
public IActionResult List()
in src/Modules/SimplCommerce.Module.Core/Areas/Core/Controllers/UserApiController.cs
58 9 1
public async Task InvokeAsync()
in src/Modules/SimplCommerce.Module.Reviews/Areas/Reviews/Components/ReviewViewComponent.cs
57 7 2
public async Task CreatePayment()
in src/Modules/SimplCommerce.Module.PaymentPaypalExpress/Areas/PaymentPaypalExpress/Controllers/PaypalExpressController.cs
56 3 0
public async Task List()
in src/Modules/SimplCommerce.Module.Reviews/Areas/Reviews/Controllers/ReviewController.cs
56 6 4
public async Task GetActiveCartDetails()
in src/Modules/SimplCommerce.Module.ShoppingCart/Services/CartService.cs
54 6 2
function ManageProductsFormCtrl()
in src/Modules/SimplCommerce.Module.Inventory/wwwroot/admin/warehouse/manage-products-form.js
54 3 4
public IActionResult NewsCategoryDetail()
in src/Modules/SimplCommerce.Module.News/Areas/News/Controllers/NewsCategoryController.cs
54 7 2
public async Task List()
in src/Modules/SimplCommerce.Module.Orders/Areas/Orders/Controllers/OrderApiController.cs
54 9 1
public ActionResult List()
in src/Modules/SimplCommerce.Module.Comments/Areas/Comments/Controllers/CommentApiController.cs
51 9 1
public ActionResult List()
in src/Modules/SimplCommerce.Module.Reviews/Areas/Reviews/Controllers/ReviewApiController.cs
51 8 1
public IActionResult List()
in src/Modules/SimplCommerce.Module.Pricing/Areas/Pricing/Controllers/CartRuleUsageApiController.cs
51 8 1
public async Task List()
in src/Modules/SimplCommerce.Module.Shipments/Areas/Shipments/Controllers/ShipmentApiController.cs
50 9 1
public Product Clone()
in src/Modules/SimplCommerce.Module.Catalog/Models/Product.cs
49 3 0
public async Task UpdateTaxAndShippingPrices()
in src/Modules/SimplCommerce.Module.Orders/Services/OrderService.cs
49 6 2
public static void SeedData()
in src/Modules/SimplCommerce.Module.Core/Data/CoreSeedData.cs
48 1 1
public async Task ExecutePayment()
in src/Modules/SimplCommerce.Module.PaymentPaypalExpress/Areas/PaymentPaypalExpress/Controllers/PaypalExpressController.cs
47 3 1
public void ConfigureServices()
in src/SimplCommerce.WebHost/Startup.cs
46 4 1
public static void Configure()
in src/SimplCommerce.WebHost/Startup.cs
46 3 2
function ThemeListCtrl()
in src/Modules/SimplCommerce.Module.Core/wwwroot/admin/themes/theme-list.js
46 1 2
private void AddOrDeleteProductLinks()
in src/Modules/SimplCommerce.Module.Catalog/Areas/Catalog/Controllers/ProductApiController.cs
45 9 2
private void PopulateAddressFormData()
in src/Modules/SimplCommerce.Module.Core/Areas/Core/Controllers/UserAddressController.cs
45 5 1
public ActionResult List()
in src/Modules/SimplCommerce.Module.Reviews/Areas/Reviews/Controllers/ReplyApiController.cs
45 7 1
public async Task ProductDetail()
in src/Modules/SimplCommerce.Module.Catalog/Areas/Catalog/Controllers/ProductController.cs
44 3 1
private void MapProductVariantToProductVm()
in src/Modules/SimplCommerce.Module.Catalog/Areas/Catalog/Controllers/ProductController.cs
44 5 2
private void PopulateShippingForm()
in src/Modules/SimplCommerce.Module.Orders/Areas/Orders/Controllers/CheckoutController.cs
44 3 2
function CategoryFormCtrl()
in src/Modules/SimplCommerce.Module.Catalog/wwwroot/admin/category/category-form.js
43 10 5