microsoft / vscode-vsce
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 142 units with 2,216 lines of code in units (74.0% of code).
    • 2 very long units (334 lines of code)
    • 6 long units (391 lines of code)
    • 22 medium size units (656 lines of code)
    • 29 small units (416 lines of code)
    • 83 very small units (419 lines of code)
15% | 17% | 29% | 18% | 18%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts15% | 17% | 29% | 18% | 18%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src15% | 17% | 29% | 18% | 18%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
224 4 1
async onFile()
in src/package.ts
110 40 1
constructor()
in src/package.ts
83 20 2
async function _publish()
in src/publish.ts
72 22 3
66 22 1
async onEnd()
in src/package.ts
63 18 0
56 2 12
51 12 1
bugs: getBugsUrl()
in src/package.ts
50 11 2
45 10 2
function collectFiles()
in src/package.ts
43 7 4
41 16 1
private guessBaseUrls()
in src/package.ts
37 10 1
37 4 2
36 8 2
33 5 2
31 5 1
27 4 2
async onEnd()
in src/package.ts
26 7 0
26 3 2