fbsamples / workplace-platform-samples
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 197 units with 1,954 lines of code in units (33.3% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (63 lines of code)
    • 16 simple units (360 lines of code)
    • 179 very simple units (1,531 lines of code)
0% | 0% | 3% | 18% | 78%
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% | 4% | 21% | 74%
py0% | 0% | 2% | 14% | 83%
php0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
SampleIntegrations/SampleBots/NodeJS0% | 0% | 4% | 23% | 72%
SupportScripts/Python/DownloadGroupFeed0% | 0% | 38% | 0% | 61%
SupportScripts/Python/ManageGroupMembers0% | 0% | 0% | 23% | 76%
SupportScripts/Python/GetGroupFeedWithDetails0% | 0% | 0% | 21% | 78%
SupportScripts/Python/GetKLCategoryInfo0% | 0% | 0% | 25% | 75%
SupportScripts/Python/GetGroupListWithDetails0% | 0% | 0% | 28% | 71%
SupportScripts/Python/RemoveMembersFromGroupUsingClaimDate0% | 0% | 0% | 38% | 61%
SupportScripts/Python/RemoveInactiveMembersFromGroup0% | 0% | 0% | 42% | 57%
SupportScripts/Python/DownloadMessagesFromMember0% | 0% | 0% | 48% | 52%
SupportScripts/Python/GetPostViewers0% | 0% | 0% | 52% | 47%
SupportScripts/Python/AccountManagement0% | 0% | 0% | 3% | 96%
SampleIntegrations/SampleWebhooks/NodeJS0% | 0% | 0% | 0% | 100%
SampleIntegrations/SamplePlatforms/NodeJS0% | 0% | 0% | 0% | 100%
SupportScripts/Python/ExportUserDataWithInsights0% | 0% | 0% | 0% | 100%
SampleIntegrations/SampleWebhooks/PHP0% | 0% | 0% | 0% | 100%
SupportScripts/Python/UpdateUserFrontlineStatus0% | 0% | 0% | 0% | 100%
SupportScripts/Python/UpdateUserEmails0% | 0% | 0% | 0% | 100%
SupportScripts/Python/AddUsersToGroup0% | 0% | 0% | 0% | 100%
SupportScripts/Python/DeleteUsers0% | 0% | 0% | 0% | 100%
SupportScripts/Python/UpdateGroupDescription0% | 0% | 0% | 0% | 100%
SupportScripts/Python/PromoteGroupMemberToAdmin0% | 0% | 0% | 0% | 100%
SupportScripts/Python/BulkReactivateUsers0% | 0% | 0% | 0% | 100%
SupportScripts/Python/RemoveGroupMembers0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
function fbWebhookPost()
in SampleIntegrations/SampleBots/NodeJS/FileAnIssue/app.js
45 15 2
def getFeed()
in SupportScripts/Python/DownloadGroupFeed/download.py
18 11 2
module._handleMessage = function()
in SampleIntegrations/SampleBots/NodeJS/FAQBot/utilities/messages.js
55 9 1
function receivedMessage()
in SampleIntegrations/SampleBots/NodeJS/ExpenseBot/app.js
39 8 1
function receivedPostback()
in SampleIntegrations/SampleBots/NodeJS/ExpenseBot/app.js
34 8 1
function claimToElement()
in SampleIntegrations/SampleBots/NodeJS/ExpenseBot/app.js
45 8 2
def validateHeaders()
in SupportScripts/Python/AccountManagement/scim_agent.py
9 8 3
function receivedMessage()
in SampleIntegrations/SampleBots/NodeJS/EmployeeSurvey/app.js
43 7 1
feed()
in SampleIntegrations/SampleBots/NodeJS/FeedPoster/clock.js
27 6 3
def getPagedData()
in SupportScripts/Python/GetPostViewers/get_post_viewers.py
12 6 3
def getPagedData()
in SupportScripts/Python/GetGroupFeedWithDetails/group_posts_detail.py
12 6 3
def getPagedData()
in SupportScripts/Python/ManageGroupMembers/manage_groups.py
12 6 3
def getPagedData()
in SupportScripts/Python/ManageGroupMembers/remove_members_from_group.py
12 6 3
def getPagedData()
in SupportScripts/Python/DownloadMessagesFromMember/messages_member.py
12 6 3
def getPagedData()
in SupportScripts/Python/GetKLCategoryInfo/export_kl_category.py
12 6 3
def getPagedData()
in SupportScripts/Python/RemoveInactiveMembersFromGroup/remove_inactive_members_from_group.py
12 6 3
def getPagedData()
in SupportScripts/Python/GetGroupListWithDetails/export_groups.py
12 6 3
def getPagedData()
in SupportScripts/Python/RemoveMembersFromGroupUsingClaimDate/remove_members_from_group_claim_date.py
12 6 3
module._getMessages = function()
in SampleIntegrations/SampleBots/NodeJS/FAQBot/utilities/messages.js
12 5 1
var ghWebhookAll = function()
in SampleIntegrations/SampleBots/NodeJS/FileAnIssue/app.js
13 5 2