firebase / snippets-web
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 607 units with 5,836 lines of code in units (58.4% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (47 lines of code)
    • 4 simple units (198 lines of code)
    • 602 very simple units (5,591 lines of code)
0% | 0% | <1% | 3% | 95%
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% | 29% | 0% | 70%
js0% | 0% | 0% | 3% | 96%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
scripts0% | 0% | 29% | 0% | 70%
auth-next0% | 0% | 0% | 4% | 95%
auth0% | 0% | 0% | 4% | 95%
storage-next0% | 0% | 0% | 11% | 88%
storage0% | 0% | 0% | 12% | 87%
snippets0% | 0% | 0% | 0% | 100%
firestore-next0% | 0% | 0% | 0% | 100%
database-next0% | 0% | 0% | 0% | 100%
database0% | 0% | 0% | 0% | 100%
analytics-next0% | 0% | 0% | 0% | 100%
analytics0% | 0% | 0% | 0% | 100%
firestore0% | 0% | 0% | 0% | 100%
messaging-next0% | 0% | 0% | 0% | 100%
messaging0% | 0% | 0% | 0% | 100%
appcheck-next0% | 0% | 0% | 0% | 100%
functions-next0% | 0% | 0% | 0% | 100%
perf-next0% | 0% | 0% | 0% | 100%
firebaseapp-next0% | 0% | 0% | 0% | 100%
perf0% | 0% | 0% | 0% | 100%
installations0% | 0% | 0% | 0% | 100%
appcheck0% | 0% | 0% | 0% | 100%
firebaseapp0% | 0% | 0% | 0% | 100%
functions0% | 0% | 0% | 0% | 100%
remoteconfig-next0% | 0% | 0% | 0% | 100%
remoteconfig0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
function collectSnippets()
in scripts/separate-snippets.ts
47 12 1
function svcIntercept()
in auth/service-worker-sessions.js
59 8 0
function svcIntercept()
in auth-next/service-worker-sessions.js
59 8 0
function uploadHandleError()
in storage/upload-files.js
39 6 1
function uploadHandleError()
in storage-next/upload-files.js
41 6 1
function queryHashes()
in firestore/test.solution-geoqueries.js
30 5 1
async function main()
in scripts/separate-snippets.ts
30 5 0
async function queryHashes()
in firestore-next/test.solution-geoqueries.js
29 5 1
function downloadFullExample()
in storage/download-files.js
19 5 0
function handleUserManagementQueryParams()
in auth/custom-email-handler.js
25 5 0
function isUserEqual()
in auth/google-signin.js
12 5 2
function isUserEqual()
in auth/facebook.js
12 5 2
function downloadFullExample()
in storage-next/download-files.js
20 5 0
function toggleStar()
in database/read-and-write.js
17 5 2
function isUserEqual()
in snippets/auth-next/google-signin/auth_google_checksameuser.js
12 5 2
function isUserEqual()
in snippets/auth-next/facebook/auth_facebook_checksameuser.js
12 5 2
function toggleStar()
in snippets/database-next/read-and-write/rtdb_social_star_transaction.js
19 5 1
function handleUserManagementQueryParams()
in auth-next/custom-email-handler.js
27 5 0
function isUserEqual()
in auth-next/google-signin.js
12 5 2
function isUserEqual()
in auth-next/facebook.js
12 5 2