Code Metrics Dashboard
Analyze code complexity, function count, line counts, and nesting depth directly in VS Code. Status bar indicators, a sidebar dashboard, and per-function metrics. Language-agnostic — works with JS, TS, Python, Go, Java, and more.

Features
Status Bar Metrics
Always-visible status bar showing complexity score, function count, and total lines for the active file. Color-coded: green (healthy), orange (warning), red (danger).
Full Dashboard (Webview)
Open a detailed dashboard panel showing:
- Total, code, comment, and blank line counts with percentages
- Cyclomatic complexity score
- Maximum nesting depth
- Per-function table: name, complexity, lines, nesting depth, line number
A dedicated Code Metrics panel in the Activity Bar with real-time stats as you navigate between files.
Inline Decorations
Subtle hints rendered above each function showing its complexity score and line count. Color-coded icons: ✓ (healthy), ⚡ (warning), ⚠️ (danger).
Supported Languages
JavaScript, TypeScript, Python, Go, Java, Rust, Ruby, C#, PHP, Swift, Kotlin — and any file where line-counting applies.
Commands
| Command |
Keybinding |
Description |
| Show Dashboard |
Ctrl+Shift+M |
Open metrics webview panel |
| Analyze Current File |
— |
Refresh and show inline metrics |
| Refresh |
— |
Re-analyze the active file |
Settings
| Setting |
Default |
Description |
codeMetrics.showInStatusBar |
true |
Show metrics in status bar |
codeMetrics.complexityWarningThreshold |
10 |
Orange indicator threshold |
codeMetrics.complexityDangerThreshold |
20 |
Red indicator threshold |
codeMetrics.functionLineLengthWarning |
50 |
Long function warning threshold |
codeMetrics.enableDecorations |
true |
Show inline complexity hints |
codeMetrics.excludePatterns |
["**/node_modules/**", ...] |
Patterns to exclude |
Understanding Cyclomatic Complexity
Cyclomatic complexity counts the number of independent paths through your code. Lower is better.
| Score |
Meaning |
| 1–5 |
Simple, easy to test |
| 6–10 |
Moderate — consider refactoring |
| 11–20 |
Complex — refactoring recommended |
| 21+ |
Very high — hard to test and maintain |
Installation
- Open VS Code
- Press
Ctrl+P
- Type
ext install miccho27.code-metrics-dashboard
- Press Enter
License
MIT