amazon-connect / amazon-connect-chat-interface
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 157 units with 1,541 lines of code in units (40.8% 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)
    • 10 simple units (355 lines of code)
    • 147 very simple units (1,186 lines of code)
0% | 0% | 0% | 23% | 76%
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% | 23% | 76%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/components0% | 0% | 0% | 22% | 77%
scripts0% | 0% | 0% | 77% | 22%
configuration0% | 0% | 0% | 0% | 100%
configuration/jest0% | 0% | 0% | 0% | 100%
src0% | 0% | 0% | 0% | 100%
src/utils0% | 0% | 0% | 0% | 100%
src/hooks0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
function build()
in scripts/build.js
54 10 1
export default function ChatComposer()
in src/components/Chat/ChatComposer/ChatComposer.js
77 9 8
render()
in src/components/core/Text/Text.js
16 8 0
function onInput()
in src/components/Chat/ChatComposer/ChatComposer.js
19 8 1
render()
in src/components/Chat/ChatTranscriptor/ChatMessages/ChatMessage.js
34 8 0
_addItemsToTranscript()
in src/components/Chat/ChatSession.js
29 8 1
async submitChatInitiation()
in src/components/Chat/ChatContainer.js
18 7 3
render()
in src/components/Chat/ChatTranscriptor/ChatTranscriptor.js
27 7 0
export default function TimePicker()
in src/components/Chat/ChatTranscriptor/ChatMessages/InteractiveMessages/TimePicker.js
58 7 2
_handleIncomingData()
in src/components/Chat/ChatSession.js
23 6 1
function ensureSlash()
in configuration/paths.js
10 5 2
render()
in src/components/core/Button/Button.js
17 5 0
renderHeader()
in src/components/Chat/ChatTranscriptor/ChatMessages/ChatMessage.js
48 5 0
(function (connect)()
in src/index.js
11 4 1
function createTranscriptItemFromSuccessResponse()
in src/components/Chat/datamodel/Utils.js
13 4 2
render()
in src/components/Chat/ChatContainer.js
24 4 0
function handleScroll()
in src/components/Chat/ChatTranscriptor/ChatTranscriptScroller.js
9 4 0
renderContent()
in src/components/Chat/ChatTranscriptor/ChatMessages/ChatMessage.js
17 4 2
renderTransportError()
in src/components/Chat/ChatTranscriptor/ChatMessages/ChatMessage.js
11 4 1
function renderTemplate()
in src/components/Chat/ChatTranscriptor/ChatMessages/InteractiveMessage.js
9 4 0