firebase / snippets-node
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 165 units with 1,812 lines of code in units (62.0% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 0 medium complex units (0 lines of code)
    • 0 simple units (0 lines of code)
    • 165 very simple units (1,812 lines of code)
0% | 0% | 0% | 0% | 100%
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% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
firestore/main0% | 0% | 0% | 0% | 100%
messaging0% | 0% | 0% | 0% | 100%
database0% | 0% | 0% | 0% | 100%
firestore/solution-sharded-timestamp0% | 0% | 0% | 0% | 100%
management0% | 0% | 0% | 0% | 100%
firestore/extend-with-functions0% | 0% | 0% | 0% | 100%
firebaseapp0% | 0% | 0% | 0% | 100%
config0% | 0% | 0% | 0% | 100%
firestore/solution-deletes0% | 0% | 0% | 0% | 100%
storage0% | 0% | 0% | 0% | 100%
auth0% | 0% | 0% | 0% | 100%
functions/stackdriver-logging0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
function customClaimsServer()
in auth/custom_claims.js
19 5 0
async function listenDiffs()
in firestore/main/index.js
18 4 2
async function transactionWithResult()
in firestore/main/index.js
19 3 1
function createQuery()
in firestore/solution-sharded-timestamp/shardedTimestamps.js
33 3 4
function writingData()
in firestore/extend-with-functions/functions/index.js
18 3 0
async function listProjects()
in management/pre_firebase.js
29 3 0
function sendMulticast()
in messaging/index.js
22 3 0
function setSignedIn()
in firestore/solution-deletes/public/index.js
10 2 1
function setEnabled()
in firestore/solution-deletes/public/index.js
7 2 2
async function transaction()
in firestore/main/index.js
20 2 1
async function getDocument()
in firestore/main/index.js
9 2 1
async function getDocumentEmpty()
in firestore/main/index.js
9 2 1
async function getMultiple()
in firestore/main/index.js
11 2 1
async function queryAndFilter()
in firestore/main/index.js
13 2 1
async function orderAndLimit()
in firestore/main/index.js
13 2 1
async function deleteQueryBatch()
in firestore/main/index.js
16 2 3
async function insertData()
in firestore/solution-sharded-timestamp/nonShardedTimestamps.js
43 2 0
function shardChunks()
in firestore/solution-sharded-timestamp/shardedTimestamps.js
11 2 0
async function insertData()
in firestore/solution-sharded-timestamp/shardedTimestamps.js
28 2 0
function triggerDocumentAnyChange()
in firestore/extend-with-functions/functions/index.js
8 2 0