microsoft / react-popout-component
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 27 units with 301 lines of code in units (74.0% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (52 lines of code)
    • 1 medium size units (25 lines of code)
    • 12 small units (167 lines of code)
    • 13 very small units (57 lines of code)
0% | 17% | 8% | 55% | 18%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
tsx0% | 24% | 0% | 58% | 17%
ts0% | 0% | 29% | 47% | 23%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src0% | 17% | 8% | 55% | 18%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
private injectHtml()
in src/Popout.tsx
52 9 2
export function generateWindowFeaturesString()
in src/generateWindowFeaturesString.ts
25 1 1
19 7 2
function validateUrl()
in src/Popout.tsx
18 6 1
15 2 1
export function crossBrowserCloneNode()
in src/crossBrowserCloneNode.ts
15 3 2
function start()
in src/childWindowMonitor.ts
14 5 1
13 3 0
13 5 0
13 3 3
12 2 1
12 2 2
export function insertPopoutStylesheetRule()
in src/insertPopoutStylesheetRule.ts
12 4 1
11 5 1
function getWindowName()
in src/Popout.tsx
8 2 1
function valueOf()
in src/generateWindowFeaturesString.ts
7 4 1
6 1 1
function stop()
in src/childWindowMonitor.ts
6 2 1
5 4 0
export function set()
in src/globalContext.ts
4 2 2