microsoft / Dynamics-365-Fraud-Protection-Samples
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 253 units with 4,408 lines of code in units (40.2% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 3 medium complex units (273 lines of code)
    • 7 simple units (400 lines of code)
    • 243 very simple units (3,735 lines of code)
0% | 0% | 6% | 9% | 84%
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% | 4% | 7% | 88%
php0% | 0% | 17% | 18% | 64%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/Web/Controllers0% | 0% | 11% | 13% | 74%
eCommerce platforms/Adobe Magento/src0% | 0% | 17% | 18% | 64%
src/Infrastructure/Data0% | 0% | 0% | 4% | 95%
src/Web/Areas0% | 0% | 0% | 38% | 61%
src/Infrastructure/Services0% | 0% | 0% | 14% | 85%
src/Infrastructure/Identity0% | 0% | 0% | 0% | 100%
src/ApplicationCore/Services0% | 0% | 0% | 0% | 100%
src/Web/Services0% | 0% | 0% | 0% | 100%
src/Web0% | 0% | 0% | 0% | 100%
src/ApplicationCore/Entities0% | 0% | 0% | 0% | 100%
src/Web/Extensions0% | 0% | 0% | 0% | 100%
src/Web/Middleware0% | 0% | 0% | 0% | 100%
src/ApplicationCore/Exceptions0% | 0% | 0% | 0% | 100%
src/ApplicationCore/Specifications0% | 0% | 0% | 0% | 100%
src/Infrastructure/Extensions0% | 0% | 0% | 0% | 100%
src/Web/ViewComponents0% | 0% | 0% | 0% | 100%
src/Infrastructure/Utilities0% | 0% | 0% | 0% | 100%
src/Web/ViewModels0% | 0% | 0% | 0% | 100%
src/Infrastructure/Logging0% | 0% | 0% | 0% | 100%
src/Web/Views0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
public function saveOrderAction()
in eCommerce platforms/Adobe Magento/src/code/local/Microsoft/Dfp/controllers/Checkout/OnepageController.php
109 18 0
private async Task RegisterUser()
in src/Web/Controllers/AccountController.cs
93 13 3
public async Task LabelOrder()
in src/Web/Controllers/OrderController.cs
71 11 7
private async Task ApproveOrRejectPurchase()
in src/Web/Controllers/BasketController.cs
62 9 5
private function UpdateStatusToDFP()
in eCommerce platforms/Adobe Magento/src/code/local/Microsoft/Dfp/Model/Observer.php
32 8 1
private Purchase SetupPurchase()
in src/Web/Controllers/BasketController.cs
132 7 2
private function generatePurchasePayload()
in eCommerce platforms/Adobe Magento/src/code/local/Microsoft/Dfp/controllers/Checkout/OnepageController.php
82 6 2
public static async Task SeedAsync()
in src/Infrastructure/Data/CatalogContextSeed.cs
36 6 3
public TokenProviderService()
in src/Infrastructure/Services/TokenProviderService.cs
22 6 1
public async Task Edit()
in src/Web/Areas/Admin/Controllers/ManageController.cs
34 6 2
public async Task SetQuantities()
in src/ApplicationCore/Services/BasketService.cs
26 5 2
private async Task SignInUser()
in src/Web/Controllers/AccountController.cs
82 5 3
public async Task ConfirmEmail()
in src/Web/Controllers/AccountController.cs
14 5 2
public function customerEventAfterAddressSave()
in eCommerce platforms/Adobe Magento/src/code/local/Microsoft/Dfp/Model/Observer.php
17 4 1
private function generateUpdateAccountPayload()
in eCommerce platforms/Adobe Magento/src/code/local/Microsoft/Dfp/Model/Observer.php
63 4 1
private function GetPaymentInstrumentDetails()
in eCommerce platforms/Adobe Magento/src/code/local/Microsoft/Dfp/controllers/Checkout/OnepageController.php
42 4 1
public CatalogFilterSpecification()
in src/ApplicationCore/Specifications/CatalogFilterSpecification.cs
5 4 2
public async Task RegisterAP()
in src/Web/Controllers/AccountController.cs
16 4 2
public async Task Register()
in src/Web/Controllers/AccountController.cs
16 4 2
public async Task Index()
in src/Web/Controllers/ManageController.cs
78 4 1