File Complexity Overall
  • There are 40 files with units, with 8,647 lines of code.
    • 0 very complex files (McCabe index sum 251+; 0 lines of code)
    • 2 complex files (McCabe index sum 126-250; 1,365 lines of code)
    • 12 medium complex files (McCabe index sum 51-125; 3,677 lines of code)
    • 6 slightly complex files (McCabe index sum 26-50; 1,268 lines of code)
    • 20 simple files (McCabe index sum 1-25; 2,337 lines of code)
  • 15 main files have no units (e.g. languages without unit analysis, or files without functions) and are not classified.
system0% | 15% | 42% | 14% | 27%
Legend:
251+
126-250
51-125
26-50
1-25


explore: grouped by folders | grouped by complexity
File Complexity per Extension
251+
126-250
51-125
26-50
1-25
cpp0% | 17% | 47% | 16% | 18%
py0% | 0% | 0% | 0% | 100%
h0% | 0% | 0% | 0% | 100%
File Complexity per Logical Decomposition
primary
251+
126-250
51-125
26-50
1-25
procgen0% | 16% | 43% | 14% | 25%
procgen-build0% | 0% | 0% | 0% | 100%
Most Complex Files (Top 40)

The McCabe index of a file grows with its size: per 100 lines tells a large but plain file from a dense one, and most complex unit whether the complexity sits in one unit or is spread over many.

File# lines# unitsMcCabe index
(sum)
per 100
lines
most complex
unit
944 84 234 25 28
coinrun.cpp
in procgen/src/games
421 28 136 32 34
jumper.cpp
in procgen/src/games
366 23 108 30 32
miner.cpp
in procgen/src/games
258 20 101 39 27
ninja.cpp
in procgen/src/games
348 21 89 26 17
dodgeball.cpp
in procgen/src/games
375 17 87 23 17
climber.cpp
in procgen/src/games
280 21 80 29 12
chaser.cpp
in procgen/src/games
332 17 80 24 20
starpilot.cpp
in procgen/src/games
349 15 80 23 23
caveflyer.cpp
in procgen/src/games
262 12 73 28 22
leaper.cpp
in procgen/src/games
244 18 72 30 11
bossfight.cpp
in procgen/src/games
402 19 71 18 16
mazegen.cpp
in procgen/src
234 10 60 26 16
fruitbot.cpp
in procgen/src/games
227 16 59 26 10
roomgen.cpp
in procgen/src
137 6 49 36 15
heist.cpp
in procgen/src/games
178 12 41 23 13
vecgame.cpp
in procgen/src
371 16 39 11 6
plunder.cpp
in procgen/src/games
228 11 39 17 11
game.cpp
in procgen/src
205 9 34 17 13
assetgen.cpp
in procgen/src
149 9 26 17 4
builder.py
in procgen
108 6 24 22 9
buffer.h
in procgen/src
112 14 23 21 2
maze.cpp
in procgen/src/games
106 8 23 22 6
env.py
in procgen
214 10 22 10 8
randgen.cpp
in procgen/src
89 13 19 21 4
build_qt.py
in procgen-build/procgen_build
129 4 19 15 12
bigfish.cpp
in procgen/src/games
96 7 18 19 7
grid.h
in procgen/src
60 11 16 27 4
vecoptions.cpp
in procgen/src
49 5 13 27 4
interactive.py
in procgen
121 4 12 10 5
entity.cpp
in procgen/src
139 4 11 8 6
24 2 8 33 6
resources.cpp
in procgen/src
940 3 8 1 5
cpp-utils.h
in procgen/src
45 4 8 18 3
qt-utils.h
in procgen/src
18 2 4 22 3
common.py
in procgen-build/procgen_build
15 1 4 27 4
game-registry.h
in procgen/src
21 2 3 14 2
build_package.py
in procgen-build/procgen_build
31 1 3 10 3
cpp-utils.cpp
in procgen/src
18 1 1 6 1
coinrun_old.cpp
in procgen/src/games
2 1 1 50 1
About This Analysis
  • File complexity is the sum of the McCabe indexes (conditional complexity) of the units (methods, functions...) in a file.
  • Files are classified in five categories based on that sum: 1-25 (simple files), 26-50 (slightly complex files), 51-125 (medium complex files), 126-250 (complex files), 251+ (very complex files). The default bands are five times the unit complexity bands, as a file is a group of units.
  • Only main code files with units are classified. Files without units (languages without unit analysis, or files without functions) have no complexity to measure and are left out rather than counted as simple.
  • A very complex file holds many decisions, which often means it has too many responsibilities: a candidate to split, and a place where changes need more testing.
Learn more...