firebase / firebase-functions-test
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 39 units with 594 lines of code in units (64.2% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (159 lines of code)
    • 1 simple units (43 lines of code)
    • 36 very simple units (392 lines of code)
0% | 0% | 26% | 7% | 65%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
ts0% | 0% | 27% | 7% | 65%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/providers0% | 0% | 25% | 0% | 74%
src0% | 0% | 31% | 20% | 48%
scripts0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
export function objectToValueProto()
in src/providers/firestore.ts
92 16 1
67 12 1
43 10 3
export function clearFirestoreData()
in src/providers/firestore.ts
34 5 1
19 4 2
function dateToTimestampProto()
in src/providers/firestore.ts
16 3 1
19 3 2
cleanup()
in src/lifecycle.ts
10 2 0
6 2 0
deleteApp()
in src/app.ts
6 2 0
export function makeDataSnapshot()
in src/providers/database.ts
13 2 4
fields: objectToValueProto()
in src/providers/firestore.ts
17 2 1
createTime: dateToTimestampProto()
in src/providers/firestore.ts
16 2 3
updateTime: dateToTimestampProto()
in src/providers/firestore.ts
13 2 3
5 2 0
function printUsage()
in scripts/tweet.js
11 1 0
function getUrl()
in scripts/tweet.js
3 1 1
constructor()
in src/lifecycle.ts
3 1 0
export function makeUserRecord()
in src/providers/auth.ts
2 1 0
export function exampleUserRecord()
in src/providers/auth.ts
10 1 0