firebase / superstatic
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 67 units with 1,052 lines of code in units (84.0% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 5 medium complex units (261 lines of code)
    • 7 simple units (182 lines of code)
    • 55 very simple units (609 lines of code)
0% | 0% | 24% | 17% | 57%
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
js0% | 0% | 25% | 15% | 59%
ts0% | 0% | 0% | 100% | 0%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/middleware0% | 0% | 25% | 21% | 52%
src0% | 0% | 18% | 25% | 56%
src/providers0% | 0% | 40% | 0% | 59%
src/loaders0% | 0% | 100% | 0% | 0%
src/cli0% | 0% | 0% | 0% | 100%
src/utils0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
module.exports = function()
in src/middleware/files.js
85 17 0
Redirect.prototype.test = function()
in src/middleware/redirects.js
48 12 1
module.exports = function()
in src/loaders/config-file.js
32 11 1
const superstatic = function()
in src/superstatic.js
50 11 1
module.exports = function()
in src/providers/fs.js
46 11 1
22 9 1
35 9 2
function providerResult()
in src/middleware/files.js
44 8 3
function getI18nLanguages()
in src/middleware/files.js
28 7 1
export function env()
in src/middleware/env.ts
27 7 1
13 7 1
const normalizedConfigHeaders = function()
in src/middleware/headers.js
13 6 2
redirect: normalizeRedirectPath()
in src/middleware/files.js
19 5 1
function cookieValue()
in src/middleware/files.js
13 5 2
const Redirect = function()
in src/middleware/redirects.js
18 5 4
module.exports = function()
in src/middleware/redirects.js
28 5 0
function configMatcher()
in src/utils/patterns.js
12 5 2
module.exports = function()
in src/middleware/protect.js
12 4 1
module.exports = function()
in src/middleware/missing.js
24 4 1
function addQuery()
in src/middleware/redirects.js
8 4 2