CodeHealthScore — Code Health Score
Comprehensive, 100% offline code health, technical debt, and complexity analytics right in your editor.
🌟 Overview
CodeHealthScore answers one central question for any software codebase:
"How healthy is this software project?"
This extension evaluates your codebase across 15 standard health dimensions and produces a transparent, evidence-based Project Health Score (0–100) directly inside Visual Studio Code. Best of all? It's 100% offline and runs locally on your machine—your code never leaves your computer.
✨ Key Features
- 🔒 100% Offline & Air-Gapped: Zero cloud backends, zero external APIs, zero telemetry, zero tracking. All analysis runs securely on your local hardware.
- 🌎 Universal Project Support: Analyzes Frontend, Backend, Mobile (iOS/Android/Flutter), Embedded, Desktop, and Monorepos.
- 🎯 Transparent Scoring: Every deduction to your score is mathematically explainable and backed by concrete local code findings.
- 💸 Technical Debt Engine: Categorizes debt hours and calculates estimated remediation effort without arbitrary numbers.
- 🔥 Top Hotspots: Combines complexity, duplication, Git churn, and defect severity to pinpoint the highest-risk files in your project.
- 🛠 Actionable Dashboard: Navigate your codebase health via an interactive UI featuring clickable findings, inline evidence, and safe automated fixes.
🩺 The 15 Universal Health Dimensions
CodeHealthScore performs static analysis across 15 critical dimensions to generate your score:
- Code Quality: Catches static code smells and bad practices (
eval(), loose equality, etc.).
- Maintainability: Calculates the SEI empirical Maintainability Index.
- Complexity: Analyzes Cyclomatic complexity, nesting depth, and file lengths.
- Technical Debt: Estimates remediation hours for complex/duplicate code.
- Architecture: Detects module dependency graph cycles and God modules.
- Test Health: Evaluates test-to-production ratios and untested complex code.
- Security: Flags high-entropy secrets (always redacted!) and security bypasses.
- Dependencies: Identifies unused dependencies and deprecated packages.
- Performance: Spots synchronous I/O in loops, ReDoS risks, and quadratic operations.
- Reliability: Catches missing timeouts, unhandled rejections, and empty catch blocks.
- Build Health: Checks compiler configuration strictness (e.g.,
tsconfig.json).
- Documentation: Verifies README presence, API doc coverage, and licenses.
- Code Hygiene: Tracks TODO/FIXME tags and leftover temporary files.
- Project Structure: Analyzes directory depth and modularity.
- Change Risk: Reviews Git commit frequency and ownership concentration.
🚀 Quick Start
- Open a workspace or folder in Visual Studio Code.
- Look for the CodeHealthScore icon in the Activity Bar (left sidebar).
- The extension will automatically evaluate your project.
- Expand the Health Overview view to see your score, or click Open Dashboard to view the rich, interactive Webview dashboard.
Commands
You can also trigger CodeHealthScore via the Command Palette (Ctrl+Shift+P / Cmd+Shift+P):
Project Health: Scan Project - Force a fresh codebase scan.
Project Health: Open Dashboard - Launch the visual overview dashboard.
Project Health: Generate Report - Export the findings to an HTML/JSON report.
⚙️ Configuration
You can customize CodeHealthScore's behavior via your VS Code settings.json:
projectHealth.failBelow (Default: 75): Threshold score below which the health check is considered failing.
projectHealth.autoScanOnOpen (Default: true): Automatically scan the workspace when VS Code is opened.
📄 License
This extension is licensed under the MIT License.
| |