Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Code Metrics Dashboard - Complexity, Functions & Line CountsNew to Visual Studio Code? Get it now.
Code Metrics Dashboard - Complexity, Functions & Line Counts

Code Metrics Dashboard - Complexity, Functions & Line Counts

miccho27

|
1 install
| (0) | Free
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, C, and more.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

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.

VS Code Marketplace Installs License: MIT

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

Sidebar Tree View

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

  1. Open VS Code
  2. Press Ctrl+P
  3. Type ext install miccho27.code-metrics-dashboard
  4. Press Enter

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft