microsoft / reactxp
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 764 units with 9,082 lines of code in units (45.4% of code).
    • 2 very complex units (323 lines of code)
    • 4 complex units (492 lines of code)
    • 28 medium complex units (1,282 lines of code)
    • 69 simple units (1,578 lines of code)
    • 661 very simple units (5,407 lines of code)
3% | 5% | 14% | 17% | 59%
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
ts9% | 0% | 13% | 15% | 60%
tsx2% | 6% | 14% | 17% | 59%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/web4% | 0% | 16% | 19% | 59%
src/common14% | 0% | 17% | 25% | 42%
extensions/virtuallistview0% | 43% | 8% | 22% | 24%
src/windows0% | 16% | 0% | 10% | 73%
src/native-common0% | 0% | 16% | 10% | 72%
extensions/navigation0% | 0% | 15% | 19% | 65%
extensions/imagesvg0% | 0% | 100% | 0% | 0%
src/native-desktop0% | 0% | 13% | 19% | 66%
extensions/netinfo0% | 0% | 56% | 0% | 43%
src/macos0% | 0% | 0% | 33% | 66%
src/tslint0% | 0% | 0% | 34% | 65%
extensions/webview0% | 0% | 0% | 0% | 100%
extensions/video0% | 0% | 0% | 0% | 100%
src/ios0% | 0% | 0% | 0% | 100%
src/android0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
private _adaptStyles()
in src/web/Styles.ts
172 57 3
export function recalcPositionFromLayoutData()
in src/common/PopupContainerViewBase.tsx
151 54 5
private _calcNewRenderedItemState()
in extensions/virtuallistview/src/VirtualListView.tsx
158 34 1
protected _buildInternalProps()
in src/windows/View.tsx
95 33 1
private _handleItemListChange()
in extensions/virtuallistview/src/VirtualListView.tsx
102 28 1
render()
in extensions/virtuallistview/src/VirtualListView.tsx
137 28 0
protected _buildInternalProps()
in src/native-common/View.tsx
68 24 1
private _updateStyles()
in src/web/Animated.tsx
62 21 2
private _adaptStyles()
in src/native-common/Styles.ts
58 18 3
private _buildTransitionSpec()
in extensions/navigation/src/native-common/NavigatorExperimentalDelegate.tsx
56 17 1
private _sendPanEvent()
in src/common/GestureView.tsx
53 17 5
private _getStyles()
in src/web/Button.tsx
19 17 0
render()
in src/web/View.tsx
87 17 0
protected _checkAndReportLayout()
in src/web/ViewBase.tsx
39 17 0
protected _updateComponentFocusRestriction()
in src/web/utils/FocusManager.ts
37 16 1
private _sendMultiTouchEvents()
in src/common/GestureView.tsx
60 15 4
render()
in extensions/imagesvg/src/web/ImageSvg.tsx
49 14 0
render()
in src/native-common/ScrollView.tsx
68 14 0
static bundleCompoundStyles()
in extensions/navigation/src/web/NavigatorSceneConfigFactory.tsx
28 13 1
setTop()
in extensions/virtuallistview/src/VirtualListCell.tsx
53 13 4