File Complexity Overall
  • There are 622 files with units, with 57,209 lines of code.
    • 8 very complex files (McCabe index sum 251+; 21,146 lines of code)
    • 8 complex files (McCabe index sum 126-250; 4,825 lines of code)
    • 31 medium complex files (McCabe index sum 51-125; 8,757 lines of code)
    • 41 slightly complex files (McCabe index sum 26-50; 6,431 lines of code)
    • 534 simple files (McCabe index sum 1-25; 16,050 lines of code)
  • 860 main files have no units (e.g. languages without unit analysis, or files without functions) and are not classified.
system36% | 8% | 15% | 11% | 28%
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
js36% | 8% | 15% | 11% | 28%
File Complexity per Logical Decomposition
primary
251+
126-250
51-125
26-50
1-25
jspm_packages39% | 8% | 11% | 10% | 30%
harness35% | 8% | 26% | 14% | 14%
build26% | 9% | 29% | 16% | 17%
src0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
deploy0% | 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
system.src.js
in jspm_packages
3440 232 2223 65 1059
2991 205 1917 64 903
core.js
in jspm_packages/npm/core-js@1.2.6/client
3804 303 921 24 22
library.js
in jspm_packages/npm/core-js@1.2.6/client
3438 277 851 25 23
shim.js
in jspm_packages/npm/core-js@1.2.6/client
3508 272 850 24 22
iscroll.js
in harness/app-assets/templates/assets/js/components
1565 80 502 32 36
iscroll.js
in build/app-assets/templates/assets/js/components
1565 80 502 32 36
curl.js
in harness
835 77 256 31 20
system-polyfills.src.js
in jspm_packages
770 120 233 30 20
index.js
in jspm_packages/npm/buffer@3.6.0
1201 48 214 18 24
reqwest.js
in jspm_packages/github/ded/reqwest@1.1.5
477 47 201 42 18
common.js
in harness/app-assets/templates/assets/js/bootstraps
585 46 140 24 16
common.js
in build/app-assets/templates/assets/js/bootstraps
585 46 140 24 16
util.js
in jspm_packages/npm/util@0.10.3
423 36 135 32 31
runtime.js
in jspm_packages/npm/babel-runtime@5.8.38/regenerator
434 34 134 31 26
external-helpers.js
in jspm_packages/npm/babel-core@5.8.38
350 28 126 36 26
assert.js
in jspm_packages/npm/assert@1.4.0
302 20 125 41 25
es5.js
in jspm_packages/npm/core-js@1.2.6/library/modules
250 25 111 44 11
es5.js
in jspm_packages/npm/core-js@1.2.6/modules
250 25 111 44 11
flipsnap.js
in harness/app-assets/templates/assets/js/components
463 31 110 24 12
flipsnap.js
in build/app-assets/templates/assets/js/components
463 31 110 24 12
liveblog.js
in harness/app-assets/templates/assets/js/bootstraps
463 34 106 23 9
liveblog.js
in build/app-assets/templates/assets/js/bootstraps
463 34 106 23 9
introspection.js
in jspm_packages/npm/babel-core@5.8.38/lib/traversal/path
229 16 94 41 24
$.buffer.js
in jspm_packages/npm/core-js@1.2.6/library/modules
294 41 88 30 18
$.buffer.js
in jspm_packages/npm/core-js@1.2.6/modules
294 41 88 30 18
es6.promise.js
in jspm_packages/npm/core-js@1.2.6/library/modules
304 27 84 28 8
es6.promise.js
in jspm_packages/npm/core-js@1.2.6/modules
304 27 84 28 8
quiz.js
in harness/app-assets/templates/assets/js/modules
398 26 78 20 9
quiz.js
in build/app-assets/templates/assets/js/modules
398 26 78 20 9
converters.js
in jspm_packages/npm/babel-core@5.8.38/lib/types
222 10 74 33 18
block-scoping.js
in jspm_packages/npm/babel-core@5.8.38/lib/transformation/transformers/es6
450 19 68 15 11
context.js
in jspm_packages/npm/babel-core@5.8.38/lib/traversal/path
181 18 65 36 13
iframeMessenger.js
in jspm_packages/github/guardian/iframe-messenger@master/src
276 25 64 23 9
validators.js
in jspm_packages/npm/babel-core@5.8.38/lib/types
139 9 62 45 33
index.js
in jspm_packages/npm/babel-core@5.8.38/lib/types
270 19 60 22 13
$.typed-array.js
in jspm_packages/npm/core-js@1.2.6/library/modules
306 34 60 20 5
$.typed-array.js
in jspm_packages/npm/core-js@1.2.6/modules
306 34 60 20 5
parentheses.js
in jspm_packages/npm/babel-core@5.8.38/lib/generation/node
137 12 57 42 12
visitors.js
in jspm_packages/npm/babel-core@5.8.38/lib/traversal
147 8 56 38 20
flow.js
in jspm_packages/npm/babel-core@5.8.38/lib/generation/generators
265 38 56 21 6
whitespace.js
in jspm_packages/npm/babel-core@5.8.38/lib/generation/node
143 15 55 38 11
ads.js
in harness/app-assets/templates/assets/js/modules
226 19 53 23 9
comments.js
in harness/app-assets/templates/assets/js/modules
220 16 53 24 8
ads.js
in build/app-assets/templates/assets/js/modules
226 19 53 23 9
comments.js
in build/app-assets/templates/assets/js/modules
220 16 53 24 8
index.js
in jspm_packages/npm/path-browserify@0.0.0
148 14 51 34 8
util.js
in jspm_packages/npm/babel-core@5.8.38/lib
184 12 49 27 8
expressions.js
in jspm_packages/npm/babel-core@5.8.38/lib/generation/generators
201 18 47 23 12
$.collection-strong.js
in jspm_packages/npm/core-js@1.2.6/library/modules
153 11 46 30 9
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...