opensearch-project / notifications
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 311 units with 5,689 lines of code in units (38.7% of code).
    • 1 very complex units (437 lines of code)
    • 0 complex units (0 lines of code)
    • 5 medium complex units (541 lines of code)
    • 7 simple units (436 lines of code)
    • 298 very simple units (4,275 lines of code)
7% | 0% | 9% | 7% | 75%
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
tsx14% | 0% | 4% | 9% | 71%
ts0% | 0% | 58% | 4% | 36%
kt0% | 0% | 2% | 5% | 92%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
dashboards-notifications/public/pages13% | 0% | 5% | 10% | 70%
dashboards-notifications/server/routes0% | 0% | 98% | 0% | 1%
notifications/core/src0% | 0% | 7% | 7% | 85%
notifications/notifications/src0% | 0% | 0% | 4% | 95%
dashboards-notifications/server/clusters0% | 0% | 0% | 0% | 100%
dashboards-notifications/public/services0% | 0% | 0% | 0% | 100%
notifications/core-spi/src0% | 0% | 0% | 0% | 100%
dashboards-notifications/server0% | 0% | 0% | 0% | 100%
dashboards-notifications/public0% | 0% | 0% | 0% | 100%
dashboards-notifications/public/utils0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
export function CreateChannel()
in dashboards-notifications/public/pages/CreateChannel/CreateChannel.tsx
437 53 1
fun execute()
in notifications/core/src/main/kotlin/org/opensearch/notifications/core/client/DestinationSnsClient.kt
41 18 3
export function configRoutes()
in dashboards-notifications/server/routes/configRoutes.ts
203 17 1
export function eventRoutes()
in dashboards-notifications/server/routes/eventRoutes.ts
135 14 1
export function CreateSESSender()
in dashboards-notifications/public/pages/Emails/CreateSESSender.tsx
129 12 1
from: isNaN()
in dashboards-notifications/public/pages/Notifications/utils/helpers.ts
33 11 2
size: isNaN()
in dashboards-notifications/public/pages/Notifications/utils/helpers.ts
30 10 2
override fun doExecute()
in notifications/notifications/src/main/kotlin/org/opensearch/notifications/action/PluginBaseAction.kt
59 10 3
export function WebhookHeaders()
in dashboards-notifications/public/pages/CreateChannel/components/WebhookHeaders.tsx
87 9 1
function updateItem()
in dashboards-notifications/public/pages/Channels/components/ChannelControls.tsx
38 8 4
export function CreateRecipientGroup()
in dashboards-notifications/public/pages/Emails/CreateRecipientGroup.tsx
112 8 1
export function ChannelActions()
in dashboards-notifications/public/pages/Channels/components/ChannelActions.tsx
69 7 1
fun prepareMimeMessage()
in notifications/core/src/main/kotlin/org/opensearch/notifications/core/client/EmailMimeProvider.kt
41 7 4
constructor()
in dashboards-notifications/public/pages/Channels/Channels.tsx
63 5 1
export function CreateSender()
in dashboards-notifications/public/pages/Emails/CreateSender.tsx
46 5 1
export function NotificationsTable()
in dashboards-notifications/public/pages/Notifications/components/NotificationsTable/NotificationsTable.tsx
112 5 1
override fun sendMessage()
in notifications/core/src/main/kotlin/org/opensearch/notifications/core/transport/SesDestinationTransport.kt
35 5 3
override fun sendMessage()
in notifications/core/src/main/kotlin/org/opensearch/notifications/core/transport/SmtpDestinationTransport.kt
35 5 3
export function getErrorMessage()
in dashboards-notifications/public/utils/helpers.ts
5 4 2
static getQueryObjectFromState()
in dashboards-notifications/public/pages/Channels/Channels.tsx
18 4 1