firebase / firebaseopensource.com
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 68 units with 902 lines of code in units (25.0% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (143 lines of code)
    • 3 simple units (142 lines of code)
    • 63 very simple units (617 lines of code)
0% | 0% | 15% | 15% | 68%
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% | 17% | 16% | 66%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
functions/src0% | 0% | 18% | 15% | 66%
frontend/assets0% | 0% | 15% | 27% | 57%
frontend0% | 0% | 0% | 0% | 100%
shared0% | 0% | 0% | 0% | 100%
frontend/plugins0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
private sanitizeHtml()
in functions/src/content.ts
117 13 5
function splitWords()
in frontend/assets/utils.ts
26 12 1
export default async function()
in frontend/assets/getRoutes.ts
47 8 0
getProjectConfig()
in functions/src/project.ts
68 8 1
arraysToMaps()
in functions/src/project.ts
27 6 2
async storeProjectReleases()
in functions/src/project.ts
15 5 1
async storeProjectContent()
in functions/src/project.ts
27 5 2
lowercaseMapKeys()
in functions/src/project.ts
18 5 1
export async function getProjectConfig()
in frontend/assets/dbUtils.ts
13 4 2
filterProjectSections()
in functions/src/project.ts
20 4 1
export default async()
in frontend/nuxt.config.js
58 3 0
export async function getProjectConfigs()
in frontend/assets/dbUtils.ts
17 3 2
export async function getSubpage()
in frontend/assets/dbUtils.ts
13 3 3
export async function getRecentReleases()
in frontend/assets/dbUtils.ts
13 3 1
static parseProjectId()
in shared/util.ts
18 3 1
name: $()
in functions/src/content.ts
18 3 1
private sanitizeRelativeLink()
in functions/src/content.ts
14 3 3
private _isIncludedProject()
in functions/src/content.ts
9 3 2
private _isGithubLink()
in functions/src/content.ts
6 3 1
static async loadGlobalConfig()
in functions/src/config.ts
16 3 0