anthropics / claude-quickstarts
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 303 units with 4,073 lines of code in units (30.4% of code).
    • 0 very complex units (0 lines of code)
    • 4 complex units (576 lines of code)
    • 17 medium complex units (782 lines of code)
    • 41 simple units (933 lines of code)
    • 241 very simple units (1,782 lines of code)
0% | 14% | 19% | 22% | 43%
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% | 44% | 29% | 18% | 7%
ts0% | 60% | 16% | 0% | 23%
py0% | 3% | 19% | 23% | 52%
tsx0% | 0% | 0% | 43% | 56%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
browser-use-demo0% | 21% | 27% | 21% | 29%
financial-data-analyst0% | 32% | 0% | 25% | 41%
computer-use-best-practices0% | 8% | 19% | 23% | 49%
autonomous-coding0% | 0% | 28% | 30% | 40%
customer-support-agent0% | 0% | 63% | 0% | 36%
computer-use-demo0% | 0% | 13% | 24% | 62%
agents0% | 0% | 10% | 20% | 69%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
83 40 1
184 35 2
98 31 2
211 28 1
85 22 2
146 21 0
32 21 3
47 20 2
33 18 0
24 18 1
48 18 3
62 18 1
22 15 2
25 12 3
47 12 1
24 12 1
42 12 2
44 12 3
19 11 3
57 11 3
25 11 3
16 10 1
19 9 4
20 9 0
50 9 1
26 9 1
19 9 2
19 8 2
43 8 1
25 8 0
10 8 2
89 8 1
37 8 1
14 8 2
13 8 1
20 8 2
32 7 4
11 7 1
24 7 2
12 7 2
28 7 0
12 7 1
10 7 1
13 7 1
15 7 1
17 7 1
13 7 3
6 6 3
20 6 1
14 6 3