firebase / firebase-js-sdk
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 3,624 units with 49,116 lines of code in units (55.1% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 80 medium complex units (4,574 lines of code)
    • 280 simple units (9,343 lines of code)
    • 3,264 very simple units (35,199 lines of code)
0% | 0% | 9% | 19% | 71%
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% | 9% | 19% | 71%
js0% | 0% | 0% | 10% | 89%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
packages/database0% | 0% | 16% | 25% | 57%
packages/firestore0% | 0% | 6% | 19% | 74%
repo-scripts/api-documenter0% | 0% | 29% | 25% | 44%
packages/auth0% | 0% | 5% | 14% | 80%
repo-scripts/size-analysis0% | 0% | 20% | 15% | 63%
packages/messaging0% | 0% | 9% | 14% | 75%
repo-scripts/prune-dts0% | 0% | 26% | 0% | 73%
scripts/ci-test0% | 0% | 66% | 0% | 33%
packages/auth-compat0% | 0% | 9% | 12% | 77%
packages/remote-config0% | 0% | 15% | 19% | 65%
scripts/ci0% | 0% | 28% | 11% | 60%
packages/app-check0% | 0% | 6% | 3% | 90%
packages/functions0% | 0% | 18% | 35% | 45%
scripts/release0% | 0% | 17% | 9% | 73%
packages/performance0% | 0% | 6% | 23% | 70%
packages/logger0% | 0% | 60% | 0% | 39%
packages/storage0% | 0% | 1% | 15% | 82%
packages/rules-unit-testing0% | 0% | 15% | 37% | 47%
packages/util0% | 0% | 0% | 39% | 60%
packages/analytics0% | 0% | 0% | 12% | 87%
scripts/build0% | 0% | 0% | 43% | 56%
packages/installations0% | 0% | 0% | 9% | 90%
scripts/docgen-compat0% | 0% | 0% | 38% | 61%
packages/database-compat0% | 0% | 0% | 21% | 78%
scripts/docgen0% | 0% | 0% | 52% | 47%
scripts/format0% | 0% | 0% | 30% | 69%
packages/app0% | 0% | 0% | 19% | 80%
scripts0% | 0% | 0% | 22% | 77%
repo-scripts/changelog-generator0% | 0% | 0% | 33% | 66%
packages/messaging-compat0% | 0% | 0% | 25% | 74%
packages/firestore-compat0% | 0% | 0% | 3% | 96%
packages/firebase0% | 0% | 0% | 0% | 100%
scripts/size_report0% | 0% | 0% | 0% | 100%
packages/app-compat0% | 0% | 0% | 0% | 100%
config0% | 0% | 0% | 0% | 100%
packages/storage-compat0% | 0% | 0% | 0% | 100%
packages/component0% | 0% | 0% | 0% | 100%
scripts/extract-deps0% | 0% | 0% | 0% | 100%
integration/firestore0% | 0% | 0% | 0% | 100%
packages/webchannel-wrapper0% | 0% | 0% | 0% | 100%
tools0% | 0% | 0% | 0% | 100%
packages/installations-compat0% | 0% | 0% | 0% | 100%
packages/remote-config-compat0% | 0% | 0% | 0% | 100%
packages/performance-compat0% | 0% | 0% | 0% | 100%
scripts/emulator-testing0% | 0% | 0% | 0% | 100%
packages/analytics-compat0% | 0% | 0% | 0% | 100%
packages/app-check-compat0% | 0% | 0% | 0% | 100%
packages/functions-compat0% | 0% | 0% | 0% | 100%
packages/template0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
function extractExportedSymbol()
in repo-scripts/prune-dts/prune-dts.ts
60 25 3
export function nodeFromJSON()
in packages/database/src/core/snap/nodeFromJSON.ts
82 24 2
protected writeNode()
in repo-scripts/api-documenter/src/markdown/MarkdownEmitter.ts
117 23 3
private writeIndexValueAux()
in packages/firestore/src/index/firestore_index_value_writer.ts
61 21 2
export function mapCodeFromHttpStatus()
in packages/firestore/src/remote/rpc_error.ts
45 21 1
private _createEntryPointOrNamespace()
in repo-scripts/api-documenter/src/documenters/MarkdownDocumenter.ts
127 21 1
private canActAsPrimary()
in packages/firestore/src/local/indexeddb_persistence.ts
73 20 1
private handleWebStorageEvent()
in packages/firestore/src/local/shared_client_state.ts
83 20 1
function validateQueryEndpoints()
in packages/database/src/api/Reference_impl.ts
60 20 1
private fullLimitUpdateChild_()
in packages/database/src/core/view/filter/LimitedFilter.ts
97 20 5
export function targetGetLowerBound()
in packages/firestore/src/core/target.ts
66 19 2
export function targetGetUpperBound()
in packages/firestore/src/core/target.ts
67 19 2
export function mapCodeFromRpcCode()
in packages/firestore/src/remote/rpc_error.ts
44 19 1
export function mapRpcCodeFromCode()
in packages/firestore/src/remote/rpc_error.ts
43 19 1
function credentialFromObject()
in packages/auth-compat/src/user_credential.ts
74 19 1
function getHeadingAnchorForApiItem()
in repo-scripts/api-documenter/src/documenters/MarkdownDocumenterHelpers.ts
48 19 1
export function isPermanentError()
in packages/firestore/src/remote/rpc_error.ts
26 18 1
export function _getBrowserName()
in packages/auth/src/core/util/browser.ts
36 18 1
export const validateObjectContainsKey = function()
in packages/database/src/core/util/validation.ts
53 18 6
function visit()
in repo-scripts/prune-dts/prune-dts.ts
47 18 1