microsoft / microsoft-ui-xaml
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 13,143 units with 174,403 lines of code in units (53.2% of code).
    • 5 very complex units (930 lines of code)
    • 39 complex units (5,424 lines of code)
    • 305 medium complex units (21,575 lines of code)
    • 639 simple units (23,959 lines of code)
    • 12,155 very simple units (122,515 lines of code)
<1% | 3% | 12% | 13% | 70%
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
cpp<1% | 4% | 19% | 15% | 59%
cs<1% | 1% | 5% | 11% | 80%
h0% | 0% | 3% | 12% | 84%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
dev/ColorPicker7% | 17% | 15% | 11% | 48%
dev/ScrollPresenter1% | 3% | 14% | 18% | 62%
dev/PersonPicture13% | 0% | 18% | 16% | 51%
dev/dll4% | 0% | 21% | 7% | 65%
dev/WebView20% | 10% | 8% | 18% | 62%
dev/NavigationView0% | 3% | 11% | 9% | 76%
dev/ParallaxView0% | 8% | 13% | 13% | 64%
dev/Generated0% | 2% | 17% | 7% | 72%
dev/ScrollView0% | 4% | 11% | 15% | 68%
dev/TeachingTip0% | 5% | 15% | 9% | 69%
dev/CommonStyles0% | 12% | 3% | 8% | 76%
dev/Lights0% | 6% | 12% | 22% | 58%
dev/SwipeControl0% | 3% | 14% | 12% | 70%
dev/TabView0% | 4% | 9% | 13% | 73%
dev/Repeater0% | <1% | 9% | 17% | 71%
dev/CommandBarFlyout0% | 2% | 24% | 23% | 49%
dev/SplitButton0% | 11% | 0% | 3% | 85%
dev/Breadcrumb0% | 3% | 3% | 12% | 81%
dev/PullToRefresh0% | 0% | 19% | 17% | 62%
dev/Materials0% | 0% | 11% | 13% | 75%
dev/TreeView0% | 0% | 8% | 12% | 79%
dev/AnimatedIcon0% | 0% | 7% | 1% | 90%
dev/RatingControl0% | 0% | 12% | 8% | 78%
tools/CustomTasks0% | 0% | 30% | 29% | 40%
dev/TwoPaneView0% | 0% | 26% | 8% | 64%
dev/NumberBox0% | 0% | 14% | 12% | 73%
dev/Common0% | 0% | 48% | 0% | 51%
dev/AnimatedVisualPlayer0% | 0% | 18% | 15% | 66%
dev/PagerControl0% | 0% | 6% | 14% | 79%
dev/InfoBar0% | 0% | 15% | 19% | 65%
dev/RadioButtons0% | 0% | 4% | 15% | 80%
dev/Effects0% | 0% | 14% | 23% | 62%
dev/ProgressBar0% | 0% | 8% | 5% | 86%
dev/TestHooks0% | 0% | 16% | 32% | 50%
dev/inc0% | 0% | 2% | 12% | 84%
dev/PipsPager0% | 0% | 0% | 27% | 72%
dev/ProgressRing0% | 0% | 0% | 9% | 90%
dev/Telemetry0% | 0% | 0% | 29% | 70%
dev/LayoutPanel0% | 0% | 0% | 25% | 74%
dev/TitleBar0% | 0% | 0% | 25% | 74%
dev/Expander0% | 0% | 0% | 18% | 81%
dev/GeneratedExperimental0% | 0% | 0% | 23% | 76%
dev/AutoSuggestBox0% | 0% | 0% | 30% | 69%
dev/RadioMenuFlyoutItem0% | 0% | 0% | 22% | 77%
dev/ComboBox0% | 0% | 0% | 18% | 81%
dev/IconSource0% | 0% | 0% | 7% | 92%
dev/RadialGradientBrush0% | 0% | 0% | 7% | 92%
dev/InfoBadge0% | 0% | 0% | 10% | 89%
dev/Interactions0% | 0% | 0% | 3% | 96%
dev/CommonManaged0% | 0% | 0% | 11% | 88%
dev/MenuBar0% | 0% | 0% | 0% | 100%
dev/Collections0% | 0% | 0% | 0% | 100%
dev/DropDownButton0% | 0% | 0% | 0% | 100%
dev/ResourceHelper0% | 0% | 0% | 0% | 100%
dev/MonochromaticOverlayPresenter0% | 0% | 0% | 0% | 100%
dev/ImageIcon0% | 0% | 0% | 0% | 100%
tools/MUXBaselineResourcesGenerator0% | 0% | 0% | 0% | 100%
dev/SplitView0% | 0% | 0% | 0% | 100%
dev/SampleControl0% | 0% | 0% | 0% | 100%
tools/GenerateNewControlProjectFiles0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
private Color GetNewColor()
in dev/ScrollPresenter/TestUI/ScrollPresenterScrollSnapPointsPage.xaml.cs
285 139 0
CharacterType InitialsGenerator::GetCharacterType()
in dev/PersonPicture/InitialsGenerator.cpp
188 93 1
void ColorPicker::OnApplyTemplate()
in dev/ColorPicker/ColorPicker.cpp
185 53 0
86 53 1
void ColorSpectrum::UpdateBitmapSources()
in dev/ColorPicker/ColorSpectrum.cpp
186 52 0
public void CanUseKeyboardToInteractWithColorSpectrum()
in dev/ColorPicker/InteractionTests/ColorPickerTests.cs
89 48 1
void RevealHoverLight::GotoLightState()
in dev/Lights/RevealHoverLight.cpp
169 46 1
winrt::Size ScrollPresenter::ArrangeOverride()
in dev/ScrollPresenter/ScrollPresenter.cpp
229 46 1
void TabView::UpdateTabWidths()
in dev/TabView/TabView.cpp
144 46 2
void ColorSpectrum::CreateBitmapsAndColorMap()
in dev/ColorPicker/ColorSpectrum.cpp
213 45 0
async public void CompleteCurrentTest()
in dev/WebView2/TestUI/WebView2BasicPage.xaml.cs
499 43 2
public void CanUseKeyboardToInteractWithSliders()
in dev/ColorPicker/InteractionTests/ColorPickerTests.cs
67 42 3
void CommandBarFlyoutCommandBar::OnKeyDown()
in dev/CommandBarFlyout/CommandBarFlyoutCommandBar.cpp
107 41 1
private void SetBrushColor_Click()
in dev/CommonStyles/TestUI/CalendarViewPage.xaml.cs
131 41 2
private Brush GetBrushFromIndex()
in dev/CommonStyles/TestUI/CalendarViewPage.xaml.cs
90 39 0
void NavigationView::OnPropertyChanged()
in dev/NavigationView/NavigationView.cpp
150 39 1
private void OverpanWithAnchoredSkrinkingContent()
in dev/ScrollPresenter/InteractionTests/ScrollPresenterTestsWithInputHelper.cs
105 39 1
void NavigationViewProperties::EnsureProperties()
in dev/Generated/NavigationView.properties.cpp
410 38 0
void ParallaxView::UpdateExpressionAnimation()
in dev/ParallaxView/ParallaxView.cpp
165 38 1
void ColorSpectrum::OnKeyDown()
in dev/ColorPicker/ColorSpectrum.cpp
94 35 1