anthropics / anthropic-sdk-php
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 5,534 units with 42,579 lines of code in units (65.9% of code).
    • 1 very complex units (74 lines of code)
    • 2 complex units (174 lines of code)
    • 23 medium complex units (928 lines of code)
    • 96 simple units (2,230 lines of code)
    • 5,412 very simple units (39,173 lines of code)
<1% | <1% | 2% | 5% | 92%
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
php<1% | <1% | 2% | 5% | 92%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src<1% | <1% | 2% | 5% | 92%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
74 52 0
85 38 1
89 26 3
57 24 26
57 24 26
61 18 5
35 16 2
41 16 18
33 15 14
39 15 17
33 14 13
44 14 2
59 13 14
72 13 2
31 12 13
58 12 0
43 12 1
25 11 10
25 11 10
27 11 11
25 11 10
25 11 10
44 11 0
28 11 1
41 11 1
25 11 10
23 10 9
23 10 9
23 10 9
28 10 2
43 10 0
33 10 4
20 10 0
35 10 1
23 10 9
23 10 9
18 10 2
32 10 3
67 9 6
21 9 8
21 9 8
25 9 10
25 9 10
21 9 8
21 9 8
32 9 1
21 9 8
21 9 8
25 9 10
19 9 2