aws-samples / spotable-game-server
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 257 units with 2,915 lines of code in units (87.0% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 9 medium complex units (487 lines of code)
    • 37 simple units (889 lines of code)
    • 211 very simple units (1,539 lines of code)
0% | 0% | 16% | 30% | 52%
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
py0% | 0% | 14% | 31% | 54%
c0% | 0% | 100% | 0% | 0%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
craft-server-image0% | 0% | 15% | 32% | 52%
craft-server-image/src0% | 0% | 100% | 0% | 0%
minecraft-server-image0% | 0% | 0% | 0% | 100%
game-server-init-container0% | 0% | 0% | 0% | 100%
minecraft-vanilla-server-image0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
void create_world()
in craft-server-image/src/world.c
68 25 4
def on_block()
in craft-server-image/server.py
71 22 6
def on_block()
in craft-server-image/server-36-python.py
58 22 6
def on_block()
in craft-server-image/server-ddb.py
61 22 6
def on_block()
in craft-server-image/serverold.py
65 22 6
def on_help()
in craft-server-image/server.py
41 12 3
def on_help()
in craft-server-image/server-36-python.py
41 12 3
def on_help()
in craft-server-image/server-ddb.py
41 12 3
def on_help()
in craft-server-image/serverold.py
41 12 3
def on_sign()
in craft-server-image/server.py
31 9 7
def on_sign()
in craft-server-image/server-36-python.py
27 9 7
def on_sign()
in craft-server-image/server-ddb.py
27 9 7
def on_sign()
in craft-server-image/serverold.py
27 9 7
def handle()
in craft-server-image/server.py
29 8 1
def on_chunk()
in craft-server-image/server.py
51 8 5
def cleanup()
in craft-server-image/server.py
27 8 0
def handle()
in craft-server-image/server-36-python.py
29 8 1
def on_chunk()
in craft-server-image/server-36-python.py
38 8 5
def cleanup()
in craft-server-image/server-36-python.py
28 8 0
def handle()
in craft-server-image/server-ddb.py
29 8 1