microsoft / Windows-appsample-customers-orders-database
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 148 units with 1,531 lines of code in units (34.0% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (37 lines of code)
    • 8 simple units (213 lines of code)
    • 139 very simple units (1,281 lines of code)
0% | 0% | 2% | 13% | 83%
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% | 2% | 13% | 83%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ContosoApp0% | 0% | 28% | 9% | 62%
ContosoApp/Views0% | 0% | 0% | 24% | 75%
ContosoApp/ViewModels0% | 0% | 0% | 8% | 91%
ContosoRepository/Sql0% | 0% | 0% | 30% | 69%
ContosoService/Controllers0% | 0% | 0% | 0% | 100%
ContosoApp/UserControls0% | 0% | 0% | 0% | 100%
ContosoRepository/Rest0% | 0% | 0% | 0% | 100%
ContosoService0% | 0% | 0% | 0% | 100%
ContosoModels0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
private void AppShell_KeyDown()
in ContosoApp/AppShell.xaml.cs
37 19 2
private async void CustomerSearchBox_TextChanged()
in ContosoApp/Views/CustomerListPage.xaml.cs
30 9 2
private async Task FilterCustomerList()
in ContosoApp/Views/CustomerListPage.xaml.cs
25 8 1
public void UpdateOrderSuggestions()
in ContosoApp/ViewModels/OrderListPageViewModel.cs
24 7 1
public async Task GetAsync()
in ContosoRepository/Sql/SqlOrderRepository.cs
35 7 1
private void NavigationView_ItemInvoked()
in ContosoApp/AppShell.xaml.cs
12 6 2
private static async Task GetOrder()
in ContosoApp/ViewModels/OrderViewModel.cs
17 6 1
protected async override void OnNavigatingFrom()
in ContosoApp/Views/CustomerDetailPage.xaml.cs
35 6 1
protected async override void OnNavigatingFrom()
in ContosoApp/Views/OrderDetailPage.xaml.cs
35 6 1
private void OnNavigatingToPage()
in ContosoApp/AppShell.xaml.cs
18 5 2
private void DataGrid_DoubleTapped()
in ContosoApp/Views/CustomerListPage.xaml.cs
15 5 2
public static void Sort()
in ContosoApp/Views/DataGridHelper.cs
16 5 3
protected override void OnLaunched()
in ContosoApp/App.xaml.cs
25 4 1
public OrderStatus SetOrderStatus()
in ContosoApp/ViewModels/OrderViewModel.cs
16 4 1
private async void RefreshButton_Click()
in ContosoApp/Views/OrderDetailPage.xaml.cs
25 4 2
public async Task PrepareAsync()
in ContosoApp/ViewModels/AuthenticationViewModel.cs
13 3 0
public async Task LoginAsync()
in ContosoApp/ViewModels/AuthenticationViewModel.cs
24 3 0
private async Task GetTokenAsync()
in ContosoApp/ViewModels/AuthenticationViewModel.cs
14 3 0
public async Task GetAadProviderAsync()
in ContosoApp/ViewModels/AuthenticationViewModel.cs
15 3 0
public async void LogoutClick()
in ContosoApp/ViewModels/AuthenticationViewModel.cs
15 3 0