facebook / flipper
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 3,474 units with 46,784 lines of code in units (47.9% of code).
    • 0 very complex units (0 lines of code)
    • 8 complex units (1,670 lines of code)
    • 87 medium complex units (6,596 lines of code)
    • 231 simple units (8,203 lines of code)
    • 3,148 very simple units (30,315 lines of code)
0% | 3% | 14% | 17% | 64%
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
tsx0% | 4% | 14% | 19% | 62%
java0% | 2% | 11% | 15% | 70%
mm0% | 16% | 27% | 0% | 55%
cpp0% | 0% | 21% | 14% | 63%
ts0% | 0% | 28% | 24% | 47%
rs0% | 0% | 0% | 9% | 90%
h0% | 0% | 0% | 0% | 100%
js0% | 0% | 0% | 0% | 100%
swift0% | 0% | 0% | 0% | 100%
kt0% | 0% | 0% | 0% | 100%
m0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
desktop/flipper-plugin0% | 10% | 14% | 18% | 55%
desktop/plugins0% | 9% | 10% | 18% | 61%
desktop/flipper-ui-core0% | 1% | 22% | 19% | 55%
android/src0% | 2% | 10% | 15% | 71%
iOS/FlipperKit0% | 21% | 35% | 0% | 42%
xplat/Flipper0% | 0% | 32% | 9% | 58%
android/plugins0% | 0% | 20% | 16% | 63%
desktop/babel-transformer0% | 0% | 29% | 11% | 58%
desktop/flipper-dump0% | 0% | 70% | 0% | 29%
desktop/scripts0% | 0% | 6% | 11% | 81%
desktop/pkg-lib0% | 0% | 46% | 48% | 5%
desktop/flipper-server-core0% | 0% | 3% | 21% | 75%
desktop/plugin-lib0% | 0% | 19% | 7% | 72%
js/js-flipper0% | 0% | 37% | 0% | 62%
desktop/static0% | 0% | 54% | 0% | 45%
desktop/flipper-server0% | 0% | 0% | 34% | 65%
xplat/FlipperWebSocket0% | 0% | 0% | 44% | 55%
desktop/pkg0% | 0% | 0% | 38% | 61%
desktop/app0% | 0% | 0% | 17% | 82%
desktop/flipper-ui-browser0% | 0% | 0% | 29% | 70%
website0% | 0% | 0% | 75% | 24%
desktop/eslint-plugin-flipper0% | 0% | 0% | 24% | 75%
desktop/doctor0% | 0% | 0% | 17% | 82%
packer/src0% | 0% | 0% | 9% | 90%
desktop/flipper-common0% | 0% | 0% | 6% | 93%
react-native/ReactNativeFlipperExample0% | 0% | 0% | 18% | 81%
android/sample0% | 0% | 0% | 0% | 100%
libs/jni-hack0% | 0% | 0% | 0% | 100%
website/src0% | 0% | 0% | 0% | 100%
react-native/react-native-flipper0% | 0% | 0% | 0% | 100%
iOS/Plugins0% | 0% | 0% | 0% | 100%
xplat/FlipperTestLib0% | 0% | 0% | 0% | 100%
iOS/Tutorial0% | 0% | 0% | 0% | 100%
iOS/SampleSwift0% | 0% | 0% | 0% | 100%
android/tutorial0% | 0% | 0% | 0% | 100%
js/react-flipper-example0% | 0% | 0% | 0% | 100%
website/static0% | 0% | 0% | 0% | 100%
android/no-op0% | 0% | 0% | 0% | 100%
PortForwardingMacApp0% | 0% | 0% | 0% | 100%
desktop/test-utils0% | 0% | 0% | 0% | 100%
xplat/FlipperTests0% | 0% | 0% | 0% | 100%
iOS/Sample0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
174 49 4
209 45 2
267 43 17
356 41 0
311 33 1
63 31 2
214 27 1
76 27 1
79 23 1
101 22 1
98 22 1
65 21 0
72 21 1
75 21 1
97 21 2
42 21 2
136 20 13
64 20 4
221 20 1
158 19 3
92 19 2
50 19 2
64 19 2
107 18 2
76 18 2
147 18 1
158 18 1
60 18 0
37 18 10
92 18 3
82 17 1
129 17 3
62 17 1
65 16 1
129 16 0
76 16 1
74 16 0
61 15 2
36 15 1
75 15 3
123 15 3
140 15 2
99 15 2
67 15 3
83 15 4
93 15 3
30 15 1
26 15 1
180 15 1
56 15 3