File Complexity Overall
  • There are 12 files with units, with 1,008 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)
    • 0 medium complex files (McCabe index sum 51-125; 0 lines of code)
    • 2 slightly complex files (McCabe index sum 26-50; 699 lines of code)
    • 10 simple files (McCabe index sum 1-25; 309 lines of code)
  • 1 main files have no units (e.g. languages without unit analysis, or files without functions) and are not classified.
system0% | 0% | 0% | 69% | 30%
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
rb0% | 0% | 0% | 69% | 30%
File Complexity per Logical Decomposition
primary
251+
126-250
51-125
26-50
1-25
lib0% | 0% | 0% | 69% | 30%
Most Complex Files (Top 12)

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
registry.rb
in lib/spectator
220 27 44 20 4
percentiles.rb
in lib/spectator/histogram
479 22 39 8 5
meter_id.rb
in lib/spectator
48 8 11 23 2
atomic_number.rb
in lib/spectator
41 8 10 24 3
timer.rb
in lib/spectator
43 6 7 16 2
counter.rb
in lib/spectator
27 5 6 22 2
distribution_summary.rb
in lib/spectator
34 5 6 18 2
clock.rb
in lib/spectator
35 6 6 17 1
measure.rb
in lib/spectator
16 3 6 38 4
gauge.rb
in lib/spectator
23 5 5 22 1
http.rb
in lib/spectator
23 2 3 13 2
19 1 2 11 2
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...