microsoft / axe-windows
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 2,560 units with 22,863 lines of code in units (62.8% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (96 lines of code)
    • 6 medium complex units (395 lines of code)
    • 46 simple units (1,119 lines of code)
    • 2,507 very simple units (21,253 lines of code)
0% | <1% | 1% | 4% | 92%
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% | <1% | 1% | 4% | 92%
cpp0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/Desktop0% | 2% | 5% | 11% | 80%
src/Core0% | 0% | 11% | 9% | 79%
src/CLI0% | 0% | 7% | 17% | 74%
src/Actions0% | 0% | 0% | 13% | 86%
src/Rules0% | 0% | 0% | 2% | 97%
src/Automation0% | 0% | 0% | 23% | 76%
src/CLITests0% | 0% | 0% | 3% | 96%
src/UnitTestSharedLibrary0% | 0% | 0% | 65% | 34%
src/CurrentFileVersionCompatibilityTests0% | 0% | 0% | 16% | 83%
src/RuleSelection0% | 0% | 0% | 13% | 86%
src/RulesMD0% | 0% | 0% | 40% | 59%
src/RulesTest0% | 0% | 0% | 0% | 100%
src/AutomationTests0% | 0% | 0% | 0% | 100%
src/CoreTests0% | 0% | 0% | 0% | 100%
src/DesktopTests0% | 0% | 0% | 0% | 100%
src/ActionsTests0% | 0% | 0% | 0% | 100%
tools/WindowsFormsControlSampler0% | 0% | 0% | 0% | 100%
src/Win32Tests0% | 0% | 0% | 0% | 100%
src/TelemetryTests0% | 0% | 0% | 0% | 100%
tools/Win32ControlSampler0% | 0% | 0% | 0% | 100%
src/Telemetry0% | 0% | 0% | 0% | 100%
src/SystemAbstractions0% | 0% | 0% | 0% | 100%
src/OldFileVersionCompatibilityTests0% | 0% | 0% | 0% | 100%
src/Win320% | 0% | 0% | 0% | 100%
tools/WildlifeManager0% | 0% | 0% | 0% | 100%
src/RuleSelectionTests0% | 0% | 0% | 0% | 100%
src/SystemAbstractionsTests0% | 0% | 0% | 0% | 100%
src/InteropDummy0% | 0% | 0% | 0% | 100%
src/CI0% | 0% | 0% | 0% | 100%
tools/WpfControlSampler0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
public static A11yPattern GetPatternInstance()
in src/Desktop/UIAutomation/A11yPatternFactory.cs
96 40 4
public override string ToString()
in src/Core/Bases/A11yProperty.cs
66 21 0
private void RegisterEventListener()
in src/Desktop/UIAutomation/EventHandlers/EventListenerFactory.cs
125 20 1
private void UnregisterEventListener()
in src/Desktop/UIAutomation/EventHandlers/EventListenerFactory.cs
105 18 1
public static bool IsSameUIElement()
in src/Core/Misc/ExtensionMethods.cs
32 14 5
public static Rectangle ToRectangle()
in src/Core/Misc/ExtensionMethods.cs
35 12 1
private void WriteBanner()
in src/CLI/OutputGenerator.cs
32 11 2
static bool IsNumber()
in src/Core/Bases/A11yPattern.cs
17 10 1
internal ColorContrastResult OnRowEnd()
in src/Desktop/ColorContrastAnalyzer/ColorContrastRunner.cs
37 10 0
public static A11yElement GetParentWindow()
in src/Desktop/Utility/ExtensionMethods.cs
26 10 1
internal ColorContrastResult Add()
in src/Desktop/ColorContrastAnalyzer/ColorContrastResult.cs
31 9 1
private void ProcessMessageQueue()
in src/Desktop/UIAutomation/EventHandlers/EventListenerFactory.cs
46 9 0
private static bool IsBoundingRectangleContained()
in src/Rules/Library/BoundingRectangleContainedInParent.cs
20 9 2
public static IOptions ProcessInputs()
in src/CLI/OptionsEvaluator.cs
48 8 2
public TextWriterVerifier()
in src/CLITests/TextWriterVerifier.cs
32 8 2
public ColorContrastResult RunColorContrastCalculation()
in src/Desktop/ColorContrastAnalyzer/ImageCollection.cs
28 8 0
public static A11yElement NormalizedElementFromPoint()
in src/Desktop/UIAutomation/A11yAutomation.cs
26 8 3
private static UIAutomationType GetUnderlyingUIAType()
in src/Desktop/UIAutomation/CustomObjects/Registrar.cs
14 8 1
internal static ITypeConverter CreateTypeConverter()
in src/Desktop/UIAutomation/CustomObjects/Registrar.cs
14 8 1
public static IUIAutomationCacheRequest GetPropertiesCache()
in src/Desktop/UIAutomation/DesktopElementHelper.cs
28 8 3