File Complexity Overall
  • There are 201 files with units, with 26,079 lines of code.
    • 1 very complex files (McCabe index sum 251+; 741 lines of code)
    • 8 complex files (McCabe index sum 126-250; 5,132 lines of code)
    • 42 medium complex files (McCabe index sum 51-125; 10,522 lines of code)
    • 38 slightly complex files (McCabe index sum 26-50; 5,011 lines of code)
    • 112 simple files (McCabe index sum 1-25; 4,673 lines of code)
  • 20 main files have no units (e.g. languages without unit analysis, or files without functions) and are not classified.
system2% | 19% | 40% | 19% | 17%
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
go3% | 23% | 35% | 20% | 17%
py0% | 0% | 67% | 12% | 19%
js0% | 0% | 66% | 20% | 12%
cjs0% | 0% | 0% | 0% | 100%
File Complexity per Logical Decomposition
primary
251+
126-250
51-125
26-50
1-25
internal5% | 24% | 29% | 21% | 19%
pkg0% | 21% | 45% | 18% | 13%
scripts0% | 0% | 61% | 14% | 24%
.github0% | 0% | 100% | 0% | 0%
cmd0% | 0% | 0% | 0% | 100%
Most Complex Files (Top 50)

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
picker_install.go
in internal/autocomplete
741 29 253 34 48
preserve.go
in internal/imagefont
712 8 218 31 49
requestflag.go
in internal/requestflag
787 52 198 25 23
flagoptions.go
in pkg/custom
652 16 185 28 69
explorer.go
in internal/jsonview
801 56 182 23 17
cmdutil.go
in pkg/custom
611 27 179 29 27
image_picker.go
in pkg/custom
584 20 176 30 54
preserve_cff.go
in internal/imagefont
503 8 157 31 53
gallery.go
in internal/imagegallery
482 25 140 29 19
project_text_stream.go
in pkg/transformers
335 14 110 33 25
312 12 107 34 37
codeql_upload.py
in .github/scripts
235 9 105 45 39
pending.go
in internal/imagegallery
247 9 97 39 22
preserve_aat.go
in internal/imagefont
244 5 96 39 42
autocomplete.go
in internal/autocomplete
329 12 93 28 25
picker_install_recovery.go
in internal/autocomplete
295 11 90 31 19
314 14 90 29 46
custom_code_report.py
in scripts/castiron
949 25 88 9 18
sdk_cross_link.py
in .github/scripts
220 14 87 40 14
263 10 87 33 19
readable_errors.go
in pkg/custom
248 9 83 33 18
source.go
in internal/imagefontmac
184 5 80 43 36
local_errors.go
in pkg/custom
229 5 80 35 42
font.go
in internal/terminalimage
237 8 79 33 55
imagefont.go
in internal/imagefont
313 15 79 25 21
172 7 79 46 34
preserve_variable.go
in internal/imagefont
197 7 78 40 21
307 16 78 25 22
184 6 75 41 34
multipartbody.go
in pkg/custom
317 18 73 23 11
preserve_variable_names.go
in internal/imagefont
198 2 71 36 55
profile.js
in internal/imagefontmac
105 6 69 66 51
426 8 69 16 29
129 11 67 52 42
kitty_output_session_unix.go
in internal/terminalimage
278 11 64 23 16
image_models.go
in pkg/custom
236 8 62 26 19
223 7 62 28 19
help.go
in internal/clihelp
244 6 61 25 41
165 7 61 37 15
readable_speech.go
in pkg/custom
204 8 61 30 20
source.js
in internal/imagefontmac
140 13 60 43 29
211 12 60 28 19
cleanup.go
in internal/imagegallery
157 3 59 38 32
summarize_resources.go
in pkg/transformers
124 3 58 47 35
166 15 57 34 10
166 8 57 34 20
encoder.go
in internal/apiform
272 7 56 21 23
custom_code_budget.py
in scripts/castiron
376 11 56 15 10
innerflag.go
in internal/requestflag
220 22 55 25 13
175 5 55 31 43
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...