firebase / geofire-js
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 50 units with 589 lines of code in units (71.4% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (72 lines of code)
    • 7 simple units (149 lines of code)
    • 41 very simple units (368 lines of code)
0% | 0% | 12% | 25% | 62%
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% | 12% | 25% | 61%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
geofire-common/src0% | 0% | 21% | 26% | 52%
geofire/src0% | 0% | 6% | 25% | 67%
geofire-common0% | 0% | 0% | 0% | 100%
geofire0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
export function validateCriteria()
in packages/geofire/src/GeoQuery.ts
25 15 2
export function geohashForLocation()
in packages/geofire-common/src/index.ts
47 12 2
export function validateLocation()
in packages/geofire-common/src/index.ts
23 10 1
public updateCriteria()
in packages/geofire/src/GeoQuery.ts
22 9 1
private _updateLocation()
in packages/geofire/src/GeoQuery.ts
18 9 2
public on()
in packages/geofire/src/GeoQuery.ts
24 8 2
export function validateKey()
in packages/geofire-common/src/index.ts
18 7 1
export function validateGeohash()
in packages/geofire-common/src/index.ts
17 6 1
public set()
in packages/geofire/src/GeoFire.ts
27 6 2
export function decodeGeoFireObject()
in packages/geofire/src/databaseUtils.ts
7 5 1
private _childRemovedCallback()
in packages/geofire/src/GeoQuery.ts
12 5 1
private _cleanUpCurrentGeohashesQueried()
in packages/geofire/src/GeoQuery.ts
25 5 0
private _geohashInSomeQuery()
in packages/geofire/src/GeoQuery.ts
12 5 1
private _listenForNewGeohashes()
in packages/geofire/src/GeoQuery.ts
42 5 0
export function geoFireGetKey()
in packages/geofire/src/databaseUtils.ts
11 4 1
private _removeLocation()
in packages/geofire/src/GeoQuery.ts
8 4 2
export function degreesToRadians()
in packages/geofire-common/src/index.ts
6 3 1
export function metersToLongitudeDegrees()
in packages/geofire-common/src/index.ts
12 3 2
export function wrapLongitude()
in packages/geofire-common/src/index.ts
12 3 1
export function geohashQuery()
in packages/geofire-common/src/index.ts
19 3 2