relayjs / eslint-plugin-relay
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 76 units with 1,571 lines of code in units (92.1% of code).
    • 0 very complex units (0 lines of code)
    • 2 complex units (427 lines of code)
    • 5 medium complex units (252 lines of code)
    • 12 simple units (343 lines of code)
    • 57 very simple units (549 lines of code)
0% | 27% | 16% | 21% | 34%
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% | 27% | 16% | 21% | 34%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src0% | 27% | 16% | 21% | 34%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
242 41 1
185 30 1
64 15 5
35 14 2
103 12 8
33 12 5
17 11 1
25 10 1
24 8 3
40 8 1
28 8 3
15 8 1
13 7 1
18 7 1
59 7 1
27 6 3
21 6 1
37 6 1
36 6 1
13 5 1
32 5 1
38 5 1
9 4 1
11 4 2
14 4 3
9 4 1
14 4 1
9 4 1
14 4 1
14 4 2
11 4 1
13 4 1
16 3 5
7 3 1
15 3 2
10 3 1
10 3 1
9 3 1
7 3 1
7 3 1
5 3 1
8 3 1
7 3 1
23 2 1
3 2 1
34 2 1
10 2 1
8 2 1
5 2 1
5 2 1