microsoft / immersive-reader-sdk
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 9 units with 256 lines of code in units (49.0% of code).
    • 1 very long units (171 lines of code)
    • 0 long units (0 lines of code)
    • 1 medium size units (29 lines of code)
    • 2 small units (29 lines of code)
    • 5 very small units (27 lines of code)
66% | 0% | 11% | 11% | 10%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts66% | 0% | 11% | 11% | 10%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
js/src66% | 0% | 11% | 11% | 10%
Alternative Visuals
Longest Units
Top 9 longest units
Unit# linesMcCabe index# params
export function launchAsync()
in js/src/launchAsync.ts
171 44 4
export function renderButtons()
in js/src/renderButtons.ts
29 9 1
function getLocalizedString()
in js/src/renderButtons.ts
18 7 1
function renderIcon()
in js/src/renderButtons.ts
11 3 1
export function isValidSubdomain()
in js/src/launchAsync.ts
8 2 1
function renderText()
in js/src/renderButtons.ts
6 2 1
function dynamicallyLoadScript()
in js/src/immersive-reader-sdk.ts
5 1 1
function renderMargin()
in js/src/renderButtons.ts
5 1 1
export function close()
in js/src/launchAsync.ts
3 1 0