File Complexity Overall
  • There are 164 files with units, with 9,186 lines of code.
    • 1 very complex files (McCabe index sum 251+; 1,211 lines of code)
    • 2 complex files (McCabe index sum 126-250; 1,211 lines of code)
    • 5 medium complex files (McCabe index sum 51-125; 1,045 lines of code)
    • 6 slightly complex files (McCabe index sum 26-50; 984 lines of code)
    • 150 simple files (McCabe index sum 1-25; 4,735 lines of code)
  • 772 main files have no units (e.g. languages without unit analysis, or files without functions) and are not classified.
system13% | 13% | 11% | 10% | 51%
Legend:
251+
126-250
51-125
26-50
1-25


explore: grouped by folders | grouped by complexity
File Complexity per Extension
251+
126-250
51-125
26-50
1-25
py33% | 11% | 28% | 6% | 19%
ts0% | 16% | 0% | 14% | 69%
tsx0% | 0% | 0% | 0% | 100%
File Complexity per Logical Decomposition
primary
251+
126-250
51-125
26-50
1-25
plugins36% | 12% | 22% | 7% | 21%
mods0% | 15% | 0% | 4% | 79%
.github0% | 0% | 100% | 0% | 0%
scripts0% | 0% | 0% | 100% | 0%
Most Complex Files (Top 50)

The McCabe index of a file grows with its size: per 100 lines tells a large but plain file from a dense one, and most complex unit whether the complexity sits in one unit or is spread over many.

File# lines# unitsMcCabe index
(sum)
per 100
lines
most complex
unit
security_reminder_hook.py
in plugins/security-guidance/hooks
1211 24 270 22 51
register.ts
in mods/diff/hooks
806 48 182 23 47
gitutil.py
in plugins/security-guidance/hooks
405 19 143 35 17
check_workflow_hardening.py
in .github/scripts
278 14 117 42 32
diffstate.py
in plugins/security-guidance/hooks
232 12 78 34 20
extensibility.py
in plugins/security-guidance/hooks
181 11 71 39 21
rule_engine.py
in plugins/hookify/core
170 8 61 36 28
config_loader.py
in plugins/hookify/core
184 5 55 30 26
ensure_agent_sdk.py
in plugins/security-guidance/hooks
138 3 43 31 36
register.ts
in mods/agents-md/hooks
213 3 38 18 34
session_state.py
in plugins/security-guidance/hooks
100 7 35 35 14
sweep.ts
in scripts
127 3 33 26 15
177 4 30 17 23
229 6 27 12 17
_base.py
in plugins/security-guidance/hooks
89 4 25 28 14
review_api.py
in plugins/security-guidance/hooks
267 8 24 9 11
telemetry-of.ts
in mods/telemetry/hooks/telemetry-of
142 9 24 17 6
dialog-pane.tsx
in mods/diff/hooks/views/dialog-pane
110 4 23 21 14
dock-plan-of.ts
in mods/diff/hooks/views/body/plan
58 1 23 40 23
kind-walk-of.ts
in mods/diff/hooks/git/probes/kind-walk-of
43 4 19 44 7
checked-value.ts
in mods/telemetry/hooks/entries/checked-value
52 5 17 33 5
parse-file-diffs.ts
in mods/diff/hooks/git/parse/parse-file-diffs
66 1 16 24 16
parse-numstat.ts
in mods/diff/hooks/git/parse
44 1 15 34 15
register.ts
in mods/sec-default/hooks
83 3 15 18 7
mode-label-of.ts
in mods/diff/hooks/pane-state/mode-label-of
28 2 13 46 7
wrapped-lines.ts
in mods/diff/hooks/views/layout/wrapped-lines
47 1 13 28 13
checked-mark.ts
in mods/telemetry/hooks/entries
37 5 13 35 5
branch-base-of.ts
in mods/diff/hooks/git/probes/branch-base-of
52 2 12 23 9
body-layout-of.ts
in mods/diff/hooks/views/body/plan
46 1 11 24 11
rename-display-of.ts
in mods/diff/hooks/git/rename-display-of
33 1 11 33 11
head-key-of.ts
in mods/diff/hooks/git/probes/head-key-of
48 2 11 23 10
register.ts
in mods/telemetry/hooks
343 7 11 3 4
list-block-of.tsx
in mods/diff/hooks/views/body
65 1 10 15 10
fetch-hunks.ts
in mods/diff/hooks/git/fetch-hunks
61 1 10 16 10
identity-of.ts
in mods/telemetry/hooks/context/identity
33 1 10 30 10
is-analytics-off.ts
in mods/telemetry/hooks/is-analytics-off
27 1 10 37 10
empty-state-of.ts
in mods/diff/hooks/pane-state
51 1 9 18 9
message-pane-of.tsx
in mods/diff/hooks/views/dialog-pane/message-pane-of
57 1 9 16 9
org-server-names.ts
in mods/sec-default/hooks/policy/managed-tools-restored/is-org-tool/org-server-names
16 1 9 56 9
terminal-of.ts
in mods/telemetry/hooks/context/terminal-of
58 1 9 16 9
list-body-of.ts
in mods/diff/hooks/views/dialog-pane/list-body-of
27 1 8 30 8
dialog-focus-of.ts
in mods/diff/hooks/views/dialog-pane
27 1 8 30 8
cell-width.ts
in mods/diff/hooks/views/layout/cell-width
16 1 8 50 8
code-blocks-of.ts
in mods/diff/hooks/views/detail/code-blocks-of
40 1 8 20 8
placeholder-of.ts
in mods/diff/hooks/views/detail/placeholder-of
27 1 8 30 8
branch-tier.ts
in mods/diff/hooks/git/tiers
39 3 8 21 6
pretooluse.py
in plugins/hookify/hooks
39 1 7 18 7
default-branch-of.ts
in mods/diff/hooks/git/probes/default-branch-of
32 2 7 22 4
checked-props.ts
in mods/telemetry/hooks/entries/checked-props
26 3 7 27 3
client-type-of.ts
in mods/telemetry/hooks/context/client-type-of
16 1 7 44 7
About This Analysis
  • File complexity is the sum of the McCabe indexes (conditional complexity) of the units (methods, functions...) in a file.
  • Files are classified in five categories based on that sum: 1-25 (simple files), 26-50 (slightly complex files), 51-125 (medium complex files), 126-250 (complex files), 251+ (very complex files). The default bands are five times the unit complexity bands, as a file is a group of units.
  • Only main code files with units are classified. Files without units (languages without unit analysis, or files without functions) have no complexity to measure and are left out rather than counted as simple.
  • A very complex file holds many decisions, which often means it has too many responsibilities: a candidate to split, and a place where changes need more testing.
Learn more...