File Complexity Overall
  • There are 16 files with units, with 2,531 lines of code.
    • 0 very complex files (McCabe index sum 251+; 0 lines of code)
    • 0 complex files (McCabe index sum 126-250; 0 lines of code)
    • 1 medium complex files (McCabe index sum 51-125; 337 lines of code)
    • 5 slightly complex files (McCabe index sum 26-50; 1,490 lines of code)
    • 10 simple files (McCabe index sum 1-25; 704 lines of code)
  • 5 main files have no units (e.g. languages without unit analysis, or files without functions) and are not classified.
system0% | 0% | 13% | 58% | 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
py0% | 0% | 16% | 51% | 31%
swift0% | 0% | 0% | 87% | 12%
File Complexity per Logical Decomposition
primary
251+
126-250
51-125
26-50
1-25
redcard0% | 0% | 16% | 51% | 31%
tools0% | 0% | 0% | 87% | 12%
Most Complex Files (Top 16)

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
detector.py
in redcard
337 16 83 25 16
321 16 46 14 10
464 17 38 8 10
calendar.py
in redcard/macos
410 22 37 9 7
cli.py
in redcard
126 10 33 26 6
gmail.py
in redcard/macos
169 12 27 16 12
chrome.py
in redcard/macos
250 14 24 10 6
demo_overlay.py
in redcard
186 9 17 9 4
39 4 14 36 6
keyboard.py
in redcard/macos
41 5 10 24 5
quit_key.py
in redcard
29 4 10 34 3
17 1 6 35 6
65 2 5 8 3
osascript.py
in redcard/macos
19 1 4 21 4
53 2 2 4 1
apps.py
in redcard/macos
5 1 1 20 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...