File Complexity Overall
  • There are 37 files with units, with 2,623 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)
    • 3 medium complex files (McCabe index sum 51-125; 1,093 lines of code)
    • 3 slightly complex files (McCabe index sum 26-50; 435 lines of code)
    • 31 simple files (McCabe index sum 1-25; 1,095 lines of code)
  • 129 main files have no units (e.g. languages without unit analysis, or files without functions) and are not classified.
system0% | 0% | 41% | 16% | 41%
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
js0% | 0% | 41% | 16% | 41%
File Complexity per Logical Decomposition
primary
251+
126-250
51-125
26-50
1-25
src0% | 0% | 52% | 12% | 35%
scripts0% | 0% | 0% | 37% | 62%
ROOT0% | 0% | 0% | 0% | 100%
Most Complex Files (Top 37)

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
schema.js
in src/lib/helpers/guardian
359 19 113 31 16
toolbelt.js
in src/lib/helpers/guardian
387 30 110 28 16
scales.js
in src/lib/helpers/guardian
347 14 59 17 8
deploy.js
in scripts
168 20 35 21 4
test-mustache.js
in src/lib/helpers/guardian
152 6 26 17 8
preflight.js
in src/lib/helpers/guardian
115 11 26 23 5
testHarness.js
in scripts
123 7 23 19 9
colours.js
in src/lib/helpers/guardian
56 1 18 32 18
googlesheet.svelte.js
in src/lib/stores
84 4 14 17 5
platform.js
in src/lib/helpers/guardian
18 4 11 61 5
mappingUtils.js
in src/lib/helpers/mapping
47 2 10 21 8
util.js
in src/lib/helpers
111 1 10 9 10
electionScales.js
in src/lib/helpers/guardian
91 5 9 10 3
colourScale.svelte.js
in src/lib/stores
37 2 8 22 7
videoScroll.svelte.js
in src/lib/stores
33 8 8 24 1
gis.js
in src/lib/helpers/mapping
68 4 6 9 3
fileSystem.js
in scripts/utils
27 2 5 19 4
preview.js
in scripts
41 2 4 10 2
logger.svelte.js
in src/lib/stores
22 2 4 18 3
scrollyteller.js
in src/lib/helpers
57 1 4 7 4
deploylog.js
in scripts
26 2 3 12 2
build.js
in scripts
33 1 3 9 3
prerender.js
in scripts
27 2 2 7 1
platform.js
in src/lib/components/guardian
8 1 2 25 2
78 1 1 1 1
app.prerender.js
in src/atoms/facewall
9 1 1 11 1
app.prerender.js
in src/atoms/chart
9 1 1 11 1
app.prerender.js
in src/atoms/videoHeader
9 1 1 11 1
app.prerender.js
in src/atoms/default
9 1 1 11 1
app.prerender.js
in src/atoms/prototyping
9 1 1 11 1
app.prerender.js
in src/atoms/map
9 1 1 11 1
app.prerender.js
in src/atoms/choropleth
9 1 1 11 1
app.prerender.js
in src/atoms/videoScroll
9 1 1 11 1
app.prerender.js
in src/atoms/scatterplotExplorer
9 1 1 11 1
app.prerender.js
in src/atoms/firemap
9 1 1 11 1
app.prerender.js
in src/atoms/pictogram
9 1 1 11 1
app.prerender.js
in src/atoms/zoomMap
9 1 1 11 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...