microsoft / TemplateStudio
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 4,907 units with 38,311 lines of code in units (33.1% of code).
    • 1 very complex units (256 lines of code)
    • 1 complex units (126 lines of code)
    • 10 medium complex units (459 lines of code)
    • 107 simple units (2,959 lines of code)
    • 4,788 very simple units (34,511 lines of code)
<1% | <1% | 1% | 7% | 90%
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
cs<1% | <1% | 1% | 7% | 89%
vb0% | 0% | 0% | 6% | 93%
cpp0% | 0% | 0% | 32% | 67%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
code/tools10% | 5% | 1% | 10% | 72%
code/src0% | 0% | 3% | 14% | 81%
templates/Uwp0% | 0% | <1% | 5% | 93%
templates/Wpf0% | 0% | 0% | 5% | 94%
templates/WinUI0% | 0% | 0% | 5% | 94%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
public static VerifierResult VerifyTemplateFolders()
in code/tools/TemplateValidator/TemplateFolderVerifier.cs
256 68 2
private static void VerifyTagUsage()
in code/tools/TemplateValidator/TemplateJsonVerifier.cs
126 42 2
public async Task ProcessComandsAsync()
in templates/Uwp/Features/DragAndDrop.CodeBehind/Services/DragAndDrop/DropConfiguration.cs
42 16 1
public async Task ProcessComandsAsync()
in templates/Uwp/Features/DragAndDrop/Services/DragAndDrop/DropConfiguration.cs
42 16 1
private string Normalize()
in code/src/UI/Controls/Markdown.cs
60 15 1
public IEnumerable GetPageNames()
in code/src/UI/ViewModels/NewProject/UserSelectionViewModel.cs
70 14 0
private bool IsCodeBehind()
in code/src/UI/Services/ProjectConfigInfoService.cs
45 13 1
private static FileExtension GetFileExtension()
in code/src/UI/ViewModels/Common/DataItems/NewItemFileViewModel.cs
32 13 1
private static void CheckIconXamlFiles()
in code/tools/TemplateValidator/TemplateFolderVerifier.cs
37 13 2
private void OnDrop()
in code/src/UI/Services/DragAndDropService/DragAndDropService.cs
55 11 2
private string GetIcon()
in code/src/UI/ViewModels/Common/DataItems/NewItemFileViewModel.cs
26 11 0
public static void SetData()
in templates/Uwp/Features/ShareSource/Helpers/DataRequestExtensions.cs
50 11 2
public static Notification GetNotification()
in code/src/UI/Extensions/SyncStatusEventArgsExtensions.cs
26 10 1
private bool IsSplitView()
in code/src/UI/Services/ProjectConfigInfoService.cs
22 10 1
public override double GetFontSize()
in code/src/UI/Services/Styles/VSStyleValuesProvider.cs
26 10 1
private async Task AddContextItemsToSolutionAsync()
in code/src/UI/VisualStudio/GenShell/VsGenShellSolution.cs
56 10 1
public static async Task VerifyTemplatePathAsync()
in code/tools/TemplateValidator/TemplateJsonVerifier.cs
41 10 1
private bool IsBlank()
in code/src/UI/Services/ProjectConfigInfoService.cs
18 9 1
private bool IsMenuBar()
in code/src/UI/Services/ProjectConfigInfoService.cs
19 9 1
public async Task DeleteSavedTemplateAsync()
in code/src/UI/ViewModels/NewProject/UserSelectionViewModel.cs
28 9 1