firebase / extensions
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 242 units with 3,770 lines of code in units (37.1% of code).
    • 0 very complex units (0 lines of code)
    • 2 complex units (222 lines of code)
    • 11 medium complex units (628 lines of code)
    • 28 simple units (1,020 lines of code)
    • 201 very simple units (1,900 lines of code)
0% | 5% | 16% | 27% | 50%
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% | 4% | 15% | 27% | 52%
js0% | 8% | 20% | 25% | 46%
java0% | 0% | 0% | 39% | 60%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
firestore-send-email0% | 27% | 33% | 7% | 31%
firestore-counter0% | 0% | 20% | 41% | 38%
firestore-bigquery-export0% | 0% | 4% | 26% | 69%
storage-resize-images0% | 0% | 0% | 40% | 59%
firestore-shorten-urls-bitly0% | 0% | 0% | 0% | 100%
firestore-translate-text0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
async function preparePayload()
in firestore-send-email/functions/lib/index.js
111 28 1
async function preparePayload()
in firestore-send-email/functions/src/index.ts
111 28 1
maybeAggregate()
in firestore-counter/functions/lib/worker.js
69 14 0
protected maybeAggregate()
in firestore-counter/functions/src/worker.ts
82 14 0
async function deliver()
in firestore-send-email/functions/lib/index.js
42 13 2
async function deliver()
in firestore-send-email/functions/src/index.ts
48 13 2
run()
in firestore-counter/functions/lib/worker.js
76 12 0
public run()
in firestore-counter/functions/src/worker.ts
85 12 0
export async function parseConfig()
in firestore-bigquery-export/scripts/import/src/config.ts
49 11 0
async function processWrite()
in firestore-send-email/functions/lib/index.js
40 11 1
updateTemplates()
in firestore-send-email/functions/lib/templates.js
45 11 1
async function processWrite()
in firestore-send-email/functions/src/index.ts
42 11 1
private updateTemplates()
in firestore-send-email/functions/src/templates.ts
50 11 1
async function parseConfig()
in firestore-bigquery-export/scripts/import/src/index.ts
48 10 0
export function buildLatestSnapshotViewQuery()
in firestore-bigquery-export/firestore-bigquery-change-tracker/src/bigquery/snapshot.ts
50 10 4
static mergeRecursive()
in firestore-counter/functions/lib/aggregator.js
18 10 3
async aggregateOnce()
in firestore-counter/functions/lib/controller.js
59 10 2
async rescheduleWorkers()
in firestore-counter/functions/lib/controller.js
76 10 0
public async aggregateOnce()
in firestore-counter/functions/src/controller.ts
70 10 2
public async rescheduleWorkers()
in firestore-counter/functions/src/controller.ts
103 10 0