angular / angularfire
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 270 units with 2,543 lines of code in units (28.7% of code).
    • 1 very long units (115 lines of code)
    • 3 long units (247 lines of code)
    • 17 medium size units (540 lines of code)
    • 44 small units (681 lines of code)
    • 205 very small units (960 lines of code)
4% | 9% | 21% | 26% | 37%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts5% | 10% | 21% | 24% | 38%
js0% | 0% | 22% | 43% | 34%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/schematics14% | 11% | 36% | 13% | 24%
tools0% | 53% | 0% | 33% | 12%
src/compat0% | 0% | 27% | 23% | 48%
site/src0% | 0% | 24% | 41% | 34%
src/firestore0% | 0% | 0% | 50% | 50%
src/storage0% | 0% | 0% | 50% | 50%
src/functions0% | 0% | 0% | 50% | 50%
src/database0% | 0% | 0% | 50% | 50%
src/performance0% | 0% | 0% | 41% | 58%
src/app-check0% | 0% | 0% | 45% | 55%
src/auth0% | 0% | 0% | 48% | 51%
src/analytics0% | 0% | 0% | 39% | 60%
src/remote-config0% | 0% | 0% | 41% | 58%
src/messaging0% | 0% | 0% | 44% | 55%
src/app0% | 0% | 0% | 43% | 56%
src0% | 0% | 0% | 0% | 100%
site/scripts0% | 0% | 0% | 0% | 100%
src/auth-guard0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
export function addToNgModule()
in src/schematics/utils.ts
115 22 3
95 10 0
export default async function deploy()
in src/schematics/deploy/actions.ts
88 12 8
64 20 0
function buildView()
in src/compat/database/list/changes.ts
46 15 2
export default createBuilder()
in src/schematics/deploy/builder.ts
44 15 2
function generateAngularJsonWithServer()
in src/schematics/ng-add.jasmine.ts
39 1 0
export function addEnvironmentEntry()
in src/schematics/utils.ts
38 9 3
export function fromRef()
in src/compat/database/observable/fromRef.ts
36 4 4
async create()
in site/src/shortcodes/includecode/index.js
34 5 2
export function docChanges()
in src/compat/firestore/collection/changes.ts
31 8 2
export function generateFirebaseJson()
in src/schematics/setup/ssr.ts
30 6 7
value: shortSiteName()
in src/schematics/setup/prompts.ts
30 3 1
function generateHostingConfig()
in src/schematics/setup/ssr.ts
29 2 4
function generateAngularJson()
in src/schematics/ng-add.jasmine.ts
29 1 0
export function createStorageRef()
in src/compat/storage/ref.ts
29 1 1
export function combineChange()
in src/compat/firestore/collection/changes.ts
28 11 2
function transform()
in site/src/shortcodes/includecode/transform.js
26 6 1
function generateHostingConfig()
in src/schematics/setup/static.ts
26 1 2
export function generateFirebaseJson()
in src/schematics/setup/static.ts
24 5 4