// code-iq analyze
Paste any code snippet and get a multi-dimensional intelligence score. Measures cyclomatic & cognitive complexity, documentation density, error handling coverage, and type safety — then computes a compositeCode IQ score.
// how-it-works
AST Analysis
Each snippet is parsed into an abstract syntax tree. Decision points, nesting depth, and structural patterns are counted from the tree — no regex guesswork.
Metric Scoring
Raw metrics are normalized against industry benchmarks. Cyclomatic scores use McCabe's thresholds (≤10 ideal). Cognitive complexity follows SonarQube weighting (each nesting level adds exponentially).
Composite IQ
The six dimension scores are weighted and combined into a single Code IQ score (0–100). The weighting favors structural health and error handling over raw documentation density.
Actionable Output
Every finding includes a specific recommendation — not just "complexity is high" but which function and which nesting level to refactor, prioritized by impact.