Code Metrics

All plugins

By Jay Cross

Version 1.0.1

Code Metrics A powerful code analysis plugin for Acode — know your code at a glance. --- Screenshots --- What is Code Metrics? Code Metrics is an Acode plugin that analyses your source files in real time and surfaces actionable quality information directly inside the editor — no server, no build step, no internet connection required. Results appear in a floating panel that you can drag, resize, and dismiss without ever leaving your file. --- Features Real-time metrics Every time you pause typing the panel updates automatically. Switching between files is instant. Deep code analysis For JavaScript, TypeScript, JSX and TSX files the plugin performs a full AST analysis and counts: - Variables, functions, classes, imports and exports - Cyclomatic complexity — every independent path through the code - Max nesting depth — the deepest level of nested blocks - React hooks and component names Maintainability Index A 0–100 score combining code volume, complexity and line count. Colour-coded green → amber → red so you can see at a glance how healthy a file is. Code smell detection Automatically flags issues with clear severity levels and suggested fixes: | Level | Condition | | ---------- | --------------------------------------------------------------- | | 🔴 Error | Complexity 50, MI 1000, nesting ≥ 6 | | 🟡 Warning | Complexity 20, MI 500, nesting ≥ 5, no comments | | 🔵 Info | Complexity 10, long lines, low comment coverage | File history with trend arrows The panel remembers the last 10 files you viewed. When you revisit a file, ↑ / ↓ arrows show whether complexity went up or the maintainability score went down since your last visit. Metric tooltips Tap the i next to any metric label for a plain-English description and a threshold interpretation tailored to the current value. Copy on long-press Long-press any stat tile for 0.6 seconds to copy the raw value to your clipboard. Draggable and resizable panel Drag the panel anywhere on screen (long-press to start drag on mobile). Pull the grip in the bottom-right corner to resize. Position and size are remembered across sessions. Android back-button support The hardware back button closes the panel — no need to reach for the × button. --- Supported languages | Language | Analysis depth | | ----------------------------------- | ---------------------------------------------------------------- | | JavaScript ·…