opensearch-project / security-dashboards-plugin
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,855 lines of code in units (52.2% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 7 medium complex units (1,063 lines of code)
    • 22 simple units (1,392 lines of code)
    • 282 very simple units (3,400 lines of code)
0% | 0% | 18% | 23% | 58%
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
ts0% | 0% | 37% | 16% | 45%
tsx0% | 0% | 5% | 28% | 65%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
server/routes0% | 0% | 86% | 0% | 13%
server/auth0% | 0% | 38% | 23% | 37%
public/apps0% | 0% | 5% | 28% | 65%
server/multitenancy0% | 0% | 32% | 3% | 64%
public/services0% | 0% | 62% | 29% | 7%
public0% | 0% | 0% | 68% | 31%
server/backend0% | 0% | 0% | 9% | 90%
server/session0% | 0% | 0% | 78% | 21%
server0% | 0% | 0% | 0% | 100%
public/utils0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
server/utils0% | 0% | 0% | 0% | 100%
server/errors0% | 0% | 0% | 0% | 100%
common0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
export function TenantSwitchPanel()
in public/apps/account/tenant-switch-panel.tsx
198 25 1
function resolve()
in server/multitenancy/tenant_resolver.ts
55 22 6
public setupRoutes()
in server/auth/types/saml/routes.ts
194 17 0
export function defineRoutes()
in server/routes/index.ts
370 16 1
export async function addTenantToShareURL()
in public/services/shared-link.ts
40 12 1
export function resolveTenant()
in server/multitenancy/tenant_resolver.ts
32 11 5
public setupRoutes()
in server/auth/types/basic/routes.ts
174 11 0
export function RoleView()
in public/apps/configuration/panels/role-view/role-view.tsx
224 10 1
async isValidCookie()
in server/auth/types/openid/openid_auth.ts
44 10 1
public setupRoutes()
in server/auth/types/openid/routes.ts
127 10 0
export function TenantList()
in public/apps/configuration/panels/tenant-list/tenant-list.tsx
129 9 1
export function LoginPage()
in public/apps/login/login-page.tsx
90 9 1
export function getSecurityCookieOptions()
in server/session/security_cookie.ts
26 9 1
export function RoleEdit()
in public/apps/configuration/panels/role-edit/role-edit.tsx
148 8 1
export function UserList()
in public/apps/configuration/panels/user-list.tsx
151 8 1
export function transformTenantData()
in public/apps/configuration/utils/tenant-utils.tsx
20 7 2
export function transformRoleTenantPermissionData()
in public/apps/configuration/utils/tenant-utils.tsx
25 7 2
export function PermissionList()
in public/apps/configuration/panels/permission-list/permission-list.tsx
105 7 1
export function TenantsPanel()
in public/apps/configuration/panels/role-view/tenants-panel.tsx
74 7 1
public start()
in public/plugin.ts
27 7 1