reactjs / react-docgen
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 237 units with 4,308 lines of code in units (80.9% of code).
    • 0 very complex units (0 lines of code)
    • 2 complex units (168 lines of code)
    • 21 medium complex units (1,001 lines of code)
    • 43 simple units (1,118 lines of code)
    • 171 very simple units (2,021 lines of code)
0% | 3% | 23% | 25% | 46%
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
ts0% | 4% | 23% | 26% | 45%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/utils0% | 5% | 26% | 22% | 45%
src/handlers0% | 0% | 23% | 38% | 37%
src/importer0% | 0% | 27% | 34% | 38%
src/resolver0% | 0% | 0% | 47% | 52%
src0% | 0% | 0% | 17% | 82%
website/src/components0% | 0% | 0% | 0% | 100%
benchmark/fixtures0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
101 35 2
67 26 3
87 23 3
53 20 3
44 17 2
61 17 3
41 16 2
34 16 3
42 15 3
52 15 3
47 14 1
53 14 1
43 14 2
64 13 2
39 13 2
29 12 1
51 12 3
40 12 2
30 12 2
55 12 3
57 11 4
37 11 1
42 11 1
36 10 3
31 10 3
32 10 2
25 10 2
67 10 4
13 9 1
31 9 4
43 9 1
18 8 2
30 8 2
30 8 5
10 8 1
33 8 1
29 8 3
22 8 2
12 8 2
43 8 4
37 7 3
28 7 3
11 7 1
11 7 1
20 7 1
25 7 2
36 7 3
36 7 3
29 7 2
30 7 2