facebookexperimental / Recoil
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 451 units with 8,375 lines of code in units (58.0% of code).
    • 0 very complex units (0 lines of code)
    • 6 complex units (1,576 lines of code)
    • 14 medium complex units (819 lines of code)
    • 54 simple units (2,013 lines of code)
    • 377 very simple units (3,967 lines of code)
0% | 18% | 9% | 24% | 47%
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
js0% | 18% | 9% | 24% | 46%
ts0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
packages-ext/recoil-devtools/src0% | 36% | 9% | 22% | 31%
packages/recoil/recoil_values0% | 34% | 10% | 22% | 32%
packages/recoil-sync0% | 20% | 10% | 44% | 24%
packages/recoil/core0% | 0% | 12% | 25% | 61%
packages/shared/util0% | 0% | 29% | 15% | 55%
packages/recoil/hooks0% | 0% | 7% | 31% | 60%
packages/recoil-sync/__test_utils__0% | 0% | 0% | 70% | 29%
packages/shared/__test_utils__0% | 0% | 0% | 17% | 82%
packages/recoil/contrib0% | 0% | 0% | 31% | 68%
packages/refine0% | 0% | 0% | 6% | 93%
packages/recoil/caches0% | 0% | 0% | 0% | 100%
typescript0% | 0% | 0% | 0% | 100%
packages/recoil/adt0% | 0% | 0% | 0% | 100%
packages/shared/polyfill0% | 0% | 0% | 0% | 100%
eslint-rules0% | 0% | 0% | 0% | 100%
scripts0% | 0% | 0% | 0% | 100%
packages-ext/recoil-devtools/utils0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
344 49 1
341 49 1
155 35 3
302 34 1
300 33 26
134 26 5
65 24 3
93 17 5
50 16 1
36 16 1
127 15 5
77 15 6
68 14 1
34 13 1
37 13 1
53 13 1
27 12 1
82 12 1
49 11 1
21 11 1
59 10 1
39 10 2
33 10 1
21 10 0
68 10 3
37 10 3
30 9 2
33 9 3
40 9 0
48 9 1
49 9 1
42 9 3
30 9 3
30 9 3
20 9 1
38 9 3
69 9 6
27 8 3
35 8 3
30 8 1
59 8 1
15 8 1
95 8 1
36 8 4
26 7 0
45 7 6
28 7 2
51 7 1
71 7 1
68 7 1