fbsamples / original-coast-clothing
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 64 units with 1,114 lines of code in units (75.2% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (207 lines of code)
    • 3 simple units (171 lines of code)
    • 59 very simple units (736 lines of code)
0% | 0% | 18% | 15% | 66%
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% | 18% | 15% | 66%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
services0% | 0% | 18% | 15% | 65%
ROOT0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
handlePayload()
in services/curation.js
157 19 1
handlePayload()
in services/receive.js
50 13 1
handleMessage()
in services/receive.js
35 10 0
handleTextMessage()
in services/receive.js
43 8 0
handlePayload()
in services/care.js
93 6 1
static handlePayload()
in services/order.js
41 5 1
static handlePayload()
in services/survey.js
23 5 1
async setPersonas()
in services/profile.js
25 4 0
setProfile()
in services/user.js
7 4 1
static async getPersonaAPI()
in services/graph-api.js
18 4 0
handlePostback()
in services/receive.js
10 4 0
firstEntity()
in services/receive.js
3 4 2
checkEnvVariables: function()
in services/config.js
16 4 0
16 3 3
20 3 1
static async callSubscriptionsAPI()
in services/graph-api.js
33 3 1
static async callSubscribedApps()
in services/graph-api.js
26 3 1
static async getUserProfile()
in services/graph-api.js
24 3 1
static async postPersonaAPI()
in services/graph-api.js
27 3 2
sendMessage()
in services/receive.js
24 3 2