SimplCommerce
Conditional Complexity

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 2,117 units with 22,546 lines of code in units (37.0% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (99 lines of code)
    • 5 medium complex units (293 lines of code)
    • 77 simple units (2,959 lines of code)
    • 2,034 very simple units (19,195 lines of code)
0% | <1% | 1% | 13% | 85%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
cs0% | <1% | 1% | 17% | 80%
js0% | 0% | <1% | 3% | 96%
Legend:
51+
26-50
11-25
6-10
1-5
Conditional Complexity per Logical Component
primary logical decomposition
Modules0% | <1% | 1% | 12% | 85%
SimplCommerce.Infrastructure0% | 0% | 0% | 27% | 72%
SimplCommerce.WebHost0% | 0% | 0% | 25% | 74%
Legend:
51+
26-50
11-25
6-10
1-5
modules logical decomposition
SimplCommerce.Module.Pricing0% | 16% | 0% | 25% | 57%
SimplCommerce.Module.Catalog0% | 0% | 5% | 15% | 79%
SimplCommerce.Module.Search0% | 0% | 32% | 0% | 67%
SimplCommerce.Module.Core0% | 0% | 0% | 9% | 90%
SimplCommerce.Module.Reviews0% | 0% | 0% | 37% | 62%
SimplCommerce.Module.Inventory0% | 0% | 0% | 19% | 80%
SimplCommerce.Module.Cms0% | 0% | 0% | 9% | 90%
SimplCommerce.Module.Shipments0% | 0% | 0% | 28% | 71%
SimplCommerce.Module.Orders0% | 0% | 0% | 8% | 91%
SimplCommerce.Module.ShoppingCart0% | 0% | 0% | 19% | 80%
SimplCommerce.Module.News0% | 0% | 0% | 14% | 85%
SimplCommerce.Module.Comments0% | 0% | 0% | 26% | 73%
SimplCommerce.Module.Notifications0% | 0% | 0% | 10% | 89%
SimplCommerce.Module.HangfireJobs0% | 0% | 0% | 29% | 70%
SimplCommerce.Module.PaymentBraintree0% | 0% | 0% | 25% | 74%
SimplCommerce.Module.Contacts0% | 0% | 0% | 8% | 91%
SimplCommerce.Module.Vendors0% | 0% | 0% | 14% | 85%
SimplCommerce.Module.ProductRecentlyViewed0% | 0% | 0% | 10% | 89%
SimplCommerce.Module.Tax0% | 0% | 0% | 3% | 96%
SimplCommerce.Module.ShippingTableRate0% | 0% | 0% | 9% | 90%
SimplCommerce.Module.SampleData0% | 0% | 0% | 13% | 86%
SimplCommerce.Module.StorageAmazonS30% | 0% | 0% | 0% | 100%
SimplCommerce.Module.StorageLocal0% | 0% | 0% | 0% | 100%
SimplCommerce.Module.StorageAzureBlob0% | 0% | 0% | 0% | 100%
SimplCommerce.Module.DinkToPdf0% | 0% | 0% | 0% | 100%
SimplCommerce.Module.PaymentPaypalExpress0% | 0% | 0% | 0% | 100%
SimplCommerce.Module.WishList0% | 0% | 0% | 0% | 100%
SimplCommerce.Module.ProductComparison0% | 0% | 0% | 0% | 100%
SimplCommerce.Module.PaymentMomo0% | 0% | 0% | 0% | 100%
SimplCommerce.Module.SignalR0% | 0% | 0% | 0% | 100%
SimplCommerce.Module.Localization0% | 0% | 0% | 0% | 100%
SimplCommerce.Module.EmailSenderSendgrid0% | 0% | 0% | 0% | 100%
SimplCommerce.Module.PaymentCashfree0% | 0% | 0% | 0% | 100%
SimplCommerce.Module.ActivityLog0% | 0% | 0% | 0% | 100%
SimplCommerce.Module.PaymentStripe0% | 0% | 0% | 0% | 100%
SimplCommerce.Module.ShippingPrices0% | 0% | 0% | 0% | 100%
SimplCommerce.Module.Payments0% | 0% | 0% | 0% | 100%
SimplCommerce.Module.ShippingFree0% | 0% | 0% | 0% | 100%
SimplCommerce.Module.EmailSenderSmtp0% | 0% | 0% | 0% | 100%
SimplCommerce.Module.PaymentCoD0% | 0% | 0% | 0% | 100%
SimplCommerce.Module.Shipping0% | 0% | 0% | 0% | 100%
SimplCommerce.Module.PaymentNganLuong0% | 0% | 0% | 0% | 100%
Legend:
51+
26-50
11-25
6-10
1-5
database tables logical decomposition
Legend:
51+
26-50
11-25
6-10
1-5
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
public async Task Validate()
in src/Modules/SimplCommerce.Module.Pricing/Services/CouponService.cs
99 29 3
function ProductFormCtrl()
in src/Modules/SimplCommerce.Module.Catalog/wwwroot/admin/product/product-form.js
13 20 9
public IActionResult Index()
in src/Modules/SimplCommerce.Module.Search/Areas/Search/Controllers/SearchController.cs
71 17 1
public IActionResult CategoryDetail()
in src/Modules/SimplCommerce.Module.Catalog/Areas/Catalog/Controllers/CategoryController.cs
72 14 2
public async Task Put()
in src/Modules/SimplCommerce.Module.Catalog/Areas/Catalog/Controllers/ProductApiController.cs
76 12 2
public IActionResult BrandDetail()
in src/Modules/SimplCommerce.Module.Catalog/Areas/Catalog/Controllers/BrandController.cs
61 12 2
function CategoryFormCtrl()
in src/Modules/SimplCommerce.Module.Catalog/wwwroot/admin/category/category-form.js
43 10 5
public async Task List()
in src/Modules/SimplCommerce.Module.Catalog/Areas/Catalog/Controllers/ProductApiController.cs
62 10 1
private async Task AddOrDeleteProductVariation()
in src/Modules/SimplCommerce.Module.Catalog/Areas/Catalog/Controllers/ProductApiController.cs
75 10 3
public async Task GetShippingPrices()
in src/Modules/SimplCommerce.Module.ShippingTableRate/Services/TableRateShippingServiceProvider.cs
21 10 2
public static void SetData()
in src/SimplCommerce.Infrastructure/Models/ExtendableObjectExtensions.cs
38 9 4
private static bool IsPrimitiveExtended()
in src/SimplCommerce.Infrastructure/Helpers/TypeHelper.cs
17 9 2
public static string ExportCsv()
in src/SimplCommerce.Infrastructure/Helpers/CsvConverter.cs
59 9 3
public async Task List()
in src/Modules/SimplCommerce.Module.Inventory/Areas/Inventory/Controllers/StockApiController.cs
40 9 2
public async Task Put()
in src/Modules/SimplCommerce.Module.Catalog/Areas/Catalog/Controllers/ProductPriceApiController.cs
37 9 1
private void AddOrDeleteProductLinks()
in src/Modules/SimplCommerce.Module.Catalog/Areas/Catalog/Controllers/ProductApiController.cs
45 9 2
public CalculatedProductPrice CalculateProductPrice()
in src/Modules/SimplCommerce.Module.Catalog/Services/ProductPricingService.cs
23 9 5
public async Task List()
in src/Modules/SimplCommerce.Module.Shipments/Areas/Shipments/Controllers/ShipmentApiController.cs
50 9 1
public ActionResult List()
in src/Modules/SimplCommerce.Module.Comments/Areas/Comments/Controllers/CommentApiController.cs
51 9 1
public async Task List()
in src/Modules/SimplCommerce.Module.Orders/Areas/Orders/Controllers/OrderApiController.cs
54 9 1
public IActionResult List()
in src/Modules/SimplCommerce.Module.Core/Areas/Core/Controllers/UserApiController.cs
58 9 1
public async Task Put()
in src/Modules/SimplCommerce.Module.Pricing/Areas/Pricing/Controllers/CartRuleApiController.cs
66 9 2
public static string ToUrlFriendly()
in src/SimplCommerce.Infrastructure/Helpers/StringHelper.cs
26 8 1
private static string ConvertEdgeCases()
in src/SimplCommerce.Infrastructure/Helpers/StringHelper.cs
30 8 1
public async Task UpdateQuantity()
in src/Modules/SimplCommerce.Module.ShoppingCart/Areas/ShoppingCart/Controllers/CartController.cs
28 8 1
public async Task Get()
in src/Modules/SimplCommerce.Module.Catalog/Areas/Catalog/Controllers/ProductApiController.cs
118 8 1
public virtual async Task PublishAsync()
in src/Modules/SimplCommerce.Module.Notifications/Services/NotificationPublisher.cs
35 8 6
function NewsItemFormCtrl()
in src/Modules/SimplCommerce.Module.News/wwwroot/admin/news-items/news-item-form.js
22 8 6
public async Task CreateShipment()
in src/Modules/SimplCommerce.Module.Shipments/Services/ShipmentService.cs
29 8 1
public async Task GetTaxPercent()
in src/Modules/SimplCommerce.Module.Tax/Services/TaxService.cs
21 8 4
protected override void OnModelCreating()
in src/Modules/SimplCommerce.Module.Core/Data/SimplDbContext.cs
34 8 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 static IQueryable OrderByName()
in src/SimplCommerce.Infrastructure/Extensions/QueryableExtensions.cs
27 7 3
public static bool IsAssignableToGenericType()
in src/SimplCommerce.Infrastructure/Helpers/ReflectionHelper.cs
20 7 2
public static IServiceCollection AddCustomizedIdentity()
in src/SimplCommerce.WebHost/Extensions/ServiceCollectionExtensions.cs
79 7 2
private static void TryLoadModuleAssembly()
in src/SimplCommerce.WebHost/Extensions/ServiceCollectionExtensions.cs
35 7 2
public static void InitializeHangfireJobs()
in src/Modules/SimplCommerce.Module.HangfireJobs/Extensions/HangfireJobsRegisterExtensions.cs
37 7 1
public Task EnqueueAsync()
in src/Modules/SimplCommerce.Module.HangfireJobs/Services/BackgroundJobManager.cs
38 7 3
public Dictionary ToDictionary()
in src/Modules/SimplCommerce.Module.Catalog/Areas/Catalog/ViewModels/SearchOption.cs
29 7 0
public async Task Post()
in src/Modules/SimplCommerce.Module.Catalog/Areas/Catalog/Controllers/ProductApiController.cs
78 7 1
public IActionResult NewsCategoryDetail()
in src/Modules/SimplCommerce.Module.News/Areas/News/Controllers/NewsCategoryController.cs
54 7 2
public async Task Shipping()
in src/Modules/SimplCommerce.Module.Orders/Areas/Orders/Controllers/CheckoutController.cs
18 7 1
public async Task Index()
in src/Modules/SimplCommerce.Module.Core/Areas/Core/Controllers/ManageController.cs
23 7 1
public async Task GetCurrentUser()
in src/Modules/SimplCommerce.Module.Core/Extensions/WorkContext.cs
36 7 0
public async Task ResetToSampleData()
in src/Modules/SimplCommerce.Module.SampleData/Services/SampleDataService.cs
16 7 1
public async Task InvokeAsync()
in src/Modules/SimplCommerce.Module.Reviews/Areas/Reviews/Components/ReviewViewComponent.cs
57 7 2
public ActionResult List()
in src/Modules/SimplCommerce.Module.Reviews/Areas/Reviews/Controllers/ReplyApiController.cs
45 7 1
public IActionResult Get()
in src/Modules/SimplCommerce.Module.Contacts/Areas/Contacts/Controllers/ContactApiController.cs
43 7 1
public void AddCouponUsage()
in src/Modules/SimplCommerce.Module.Pricing/Services/CouponService.cs
39 7 3