amazon-connect / amazon-connect-chat-interface
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 157 units with 1,541 lines of code in units (40.8% of code).
    • 0 very long units (0 lines of code)
    • 3 long units (189 lines of code)
    • 14 medium size units (412 lines of code)
    • 27 small units (379 lines of code)
    • 113 very small units (561 lines of code)
0% | 12% | 26% | 24% | 36%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js0% | 12% | 26% | 24% | 36%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/components0% | 10% | 29% | 25% | 35%
scripts0% | 77% | 0% | 0% | 22%
configuration0% | 0% | 30% | 25% | 44%
configuration/jest0% | 0% | 0% | 63% | 36%
src0% | 0% | 0% | 40% | 59%
src/utils0% | 0% | 0% | 0% | 100%
src/hooks0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
export default function ChatComposer()
in src/components/Chat/ChatComposer/ChatComposer.js
77 9 8
export default function TimePicker()
in src/components/Chat/ChatTranscriptor/ChatMessages/InteractiveMessages/TimePicker.js
58 7 2
function build()
in scripts/build.js
54 10 1
renderHeader()
in src/components/Chat/ChatTranscriptor/ChatMessages/ChatMessage.js
48 5 0
render()
in src/components/Chat/Chat.js
39 4 0
render()
in src/components/Chat/ChatTranscriptor/ChatMessages/ChatMessage.js
34 8 0
_handleTypingEvent()
in src/components/Chat/ChatSession.js
31 4 1
export function initiateChat()
in src/components/Chat/ChatInitiator.js
30 4 1
sendAttachment()
in src/components/Chat/ChatSession.js
30 2 1
addOutgoingMessage()
in src/components/Chat/ChatSession.js
29 1 1
_addItemsToTranscript()
in src/components/Chat/ChatSession.js
29 8 1
render()
in src/components/Chat/ChatTranscriptor/ChatTranscriptor.js
27 7 0
export default function Panel()
in src/components/Chat/ChatTranscriptor/ChatMessages/InteractiveMessages/Panel.js
26 3 2
render()
in src/components/Chat/ChatContainer.js
24 4 0
_handleIncomingData()
in src/components/Chat/ChatSession.js
23 6 1
function getClientEnvironment()
in configuration/env.js
21 2 1
function createItemFromIncoming()
in src/components/Chat/datamodel/Utils.js
21 2 2
process()
in configuration/jest/fileTransform.js
19 2 2
function onInput()
in src/components/Chat/ChatComposer/ChatComposer.js
19 8 1
async submitChatInitiation()
in src/components/Chat/ChatContainer.js
18 7 3