firebase / firebase-tools-ui
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 259 units with 2,711 lines of code in units (17.4% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 4 medium complex units (215 lines of code)
    • 13 simple units (329 lines of code)
    • 242 very simple units (2,167 lines of code)
0% | 0% | 7% | 12% | 79%
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
tsx0% | 0% | 12% | 13% | 74%
ts0% | 0% | 3% | 11% | 85%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/components/Firestore0% | 0% | 11% | 21% | 67%
src/components/LogViewer0% | 0% | 82% | 0% | 17%
src/components/Database0% | 0% | 0% | 12% | 87%
src/components/Auth0% | 0% | 0% | 24% | 75%
src/components/common0% | 0% | 0% | 5% | 94%
src/components/Storage0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
src0% | 0% | 0% | 0% | 100%
src/store0% | 0% | 0% | 0% | 100%
src/store/auth0% | 0% | 0% | 0% | 100%
src/store/config0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
function summarizeExp()
in src/components/Firestore/DocumentPreview/store.tsx
46 25 2
export function parseQuery()
in src/components/LogViewer/QueryBar.tsx
88 15 1
export function summarize()
in src/components/Firestore/utils.ts
36 13 2
function truncateRequestPathFromLeft()
in src/components/Firestore/Requests/RequestPath/index.tsx
45 11 4
export function applyQuery()
in src/components/Database/DataViewer/common/fetch.ts
18 9 2
export function defaultValueForPrimitiveType()
in src/components/Firestore/DocumentEditor/utils.ts
21 9 1
function summarizeConstraint()
in src/components/Firestore/DocumentPreview/store.tsx
48 9 2
function getRestQueryParams()
in src/components/Database/DataViewer/common/fetch.ts
21 8 1
export function getFieldType()
in src/components/Firestore/utils.ts
24 8 1
function adjustPayloadForArray()
in src/components/Firestore/DocumentPreview/api.tsx
25 8 3
function validate()
in src/components/Auth/UserFormDialog/controls/CustomAttributes.tsx
20 7 1
export function withCollectionState()
in src/components/Firestore/Collection.tsx
53 7 1
export function isSingleValueCollectionFilter()
in src/components/Firestore/models.ts
13 7 1
function fixHostname()
in src/components/common/EmulatorConfigProvider.tsx
14 7 1
function getErrorText()
in src/components/Auth/UserFormDialog/controls/EmailPassword.tsx
16 6 1
export function denormalize()
in src/components/Firestore/DocumentEditor/utils.ts
38 6 2
function summarizeSegment()
in src/components/Firestore/DocumentPreview/store.tsx
18 6 2
30 5 1
11 5 1
function getDocumentFieldType()
in src/components/Firestore/DocumentEditor/index.tsx
14 5 1