File Complexity Overall
  • There are 28 files with units, with 21,987 lines of code.
    • 3 very complex files (McCabe index sum 251+; 8,670 lines of code)
    • 5 complex files (McCabe index sum 126-250; 5,513 lines of code)
    • 5 medium complex files (McCabe index sum 51-125; 3,635 lines of code)
    • 3 slightly complex files (McCabe index sum 26-50; 939 lines of code)
    • 12 simple files (McCabe index sum 1-25; 3,230 lines of code)
  • 14 main files have no units (e.g. languages without unit analysis, or files without functions) and are not classified.
system39% | 25% | 16% | 4% | 14%
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
rs34% | 18% | 21% | 5% | 20%
py51% | 42% | 3% | 1% | 0%
File Complexity per Logical Decomposition
primary
251+
126-250
51-125
26-50
1-25
src34% | 18% | 21% | 5% | 20%
script51% | 42% | 3% | 1% | 0%
Most Complex Files (Top 28)

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
host_observation.py
in script/lib
3200 106 595 19 60
2908 118 363 12 24
2562 94 338 13 26
793 32 223 28 42
action_release.py
in script/lib
510 18 192 38 34
1908 69 187 10 13
1350 40 179 13 35
952 45 137 14 13
1090 35 119 11 19
block_evidence.py
in script/lib
233 16 69 30 27
771 37 63 8 9
611 34 62 10 10
config.rs
in src
930 21 51 5 9
nflog.rs
in src
342 11 38 11 15
dns_evidence.py
in script/lib
92 6 31 34 14
505 16 26 5 5
plan.rs
in src
425 7 23 5 12
cli.rs
in src
332 16 18 5 2
822 4 15 2 9
343 7 10 3 2
145 8 9 6 2
nft.rs
in src
462 5 7 2 3
88 6 7 8 2
output.rs
in src
95 4 5 5 2
394 1 4 1 4
main.rs
in src
10 1 2 20 2
error.rs
in src
43 1 1 2 1
lib.rs
in src
71 1 1 1 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...