anthropics / claude-code
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 119 units with 3,008 lines of code in units (66.4% of code).
    • 1 very complex units (170 lines of code)
    • 5 complex units (679 lines of code)
    • 21 medium complex units (818 lines of code)
    • 30 simple units (684 lines of code)
    • 62 very simple units (657 lines of code)
5% | 22% | 27% | 22% | 21%
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
py6% | 26% | 18% | 25% | 21%
ts0% | 0% | 73% | 5% | 21%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
plugins6% | 26% | 18% | 25% | 21%
scripts0% | 0% | 73% | 5% | 21%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
170 51 1
267 48 1
91 36 0
201 29 1
49 28 7
71 26 1
107 23 0
40 21 2
41 20 4
31 19 2
19 17 1
140 17 0
39 15 3
33 15 1
25 15 2
52 15 2
29 14 0
26 14 3
32 13 3
25 13 1
24 13 1
34 12 3
26 12 2
36 12 2
17 11 2
32 11 2
10 11 1
95 10 0
19 10 1
37 10 4
17 9 1
30 9 4
14 8 1
26 8 1
30 8 1
14 8 1
21 8 7
16 7 2
33 7 1
24 7 1
12 7 5
12 7 4
20 7 0
27 6 1
20 6 3
25 6 1
14 6 2
19 6 3
15 6 5
3 6 1