openai / openai-apps-sdk-examples
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 136 units with 5,750 lines of code in units (41.3% of code).
    • 1 very complex units (856 lines of code)
    • 3 complex units (799 lines of code)
    • 6 medium complex units (848 lines of code)
    • 13 simple units (467 lines of code)
    • 113 very simple units (2,780 lines of code)
14% | 13% | 14% | 8% | 48%
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
tsx33% | 31% | 8% | 4% | 22%
ts0% | 0% | 19% | 12% | 68%
py0% | 0% | 23% | 0% | 76%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src30% | 28% | 9% | 7% | 23%
cards_against_ai_server_node0% | 0% | 59% | 22% | 18%
authenticated_server_python0% | 0% | 45% | 0% | 54%
solar-system_server_python0% | 0% | 27% | 0% | 72%
kitchen_sink_server_node0% | 0% | 0% | 14% | 85%
pizzaz_server_node0% | 0% | 0% | 12% | 87%
mcp_app_basics_node0% | 0% | 0% | 0% | 100%
shopping_cart_python0% | 0% | 0% | 0% | 100%
pizzaz_server_python0% | 0% | 0% | 0% | 100%
kitchen_sink_server_python0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
856 113 0
178 30 0
206 28 1
415 26 0
46 21 0
148 18 2
367 18 0
19 15 1
209 13 0
59 11 1
30 9 1
33 8 2
36 7 3
38 7 0
38 7 3
30 6 0
18 6 2
29 6 1
91 6 3
28 6 2
35 6 1
32 6 1
29 6 1
26 5 3
14 5 1
26 5 3
24 5 1
23 5 2
45 5 4
4 4 1
4 4 1
4 4 1
4 4 1
4 4 1
6 4 1
12 4 1
22 4 1
17 4 1
14 4 2
39 4 10
11 3 1
10 3 0
11 3 1
10 3 0
23 3 1
7 3 2
7 3 2
11 3 2
10 3 1
18 3 2