Quality Score: 50/100
Medium RiskThis repo has some quality gaps (No tests detected, Stale (6+ months)) but is maintainable with improvements.
No tests detected -15Stale (6+ months) -15Abandoned (1+ year) -10Multiple anti-patterns -10
Maintainability grade
Static analysisHow maintainable the code looks — from complexity, code issues, test presence, file size, and hotspot load. It grades the shape of the code, not defect risk, and doesn't replace review.
C68/100
A ≥ 85, B ≥ 70, C ≥ 55, D ≥ 40, F < 40
Cyclomatic complexityavg 535/35 Code issues0 errors, 24 warnings8/20 Largest file84 lines15/15 Hotspot load0 high-risk files10/10 Configuration status
CI/CD Pipeline — configured
Test Suite — not detected
Add unit tests for critical paths
Test Coverage — ~0%heuristic
0 test files / 6 source files. This is a file-count ratio, not real line coverage — set up Codecov for authoritative numbers.
Dependency Scanning — no config detected
No Dependabot / Renovate / Snyk / Trivy / CodeQL config found. Enable Dependabot or Renovate.
Top hotspots
Files edited often AND hard to reason about. Churn = recent commit frequency, Complexity = branches and nesting, Risk = both combined. These are the highest-leverage targets for refactoring or testing.
test.jsChurn: 0 (0 commits/180d)Complexity: 21Risk: 0
index.jsChurn: 0 (0 commits/180d)Complexity: 27Risk: 0
All hotspots
Files that change often and are complex tend to accumulate more bugs
AI-suggested anti-patterns
AI · unverifiedPattern-matches from the file structure and dependencies — useful as hypotheses, but not grounded in actual source. For real findings see Code Scanning above.
No input validation
MediumFunction does not validate or throw on invalid inputs (negative length, null/undefined values); silently coerces or returns unexpected results.
index.js
Unicode handling limitation
MediumSurrogate pairs in UTF-16 (emoji, non-BMP characters) counted as two characters, causing incorrect padding length.
index.js
Multi-character pad string accepted
LowThird argument documented as single char but function accepts and processes multi-character strings without error.
index.js
AI-suggested bottlenecks
AI · unverifiedSpeculation from file structure, not profiling data. Validate against real metrics before acting on these.
Algorithmic time complexity Bottleneck
String.prototype.repeat() called to generate padding; O(n) performance for large padding widths.
index.js (string repeat operation)
Process/tooling gap Bottleneck
Manual performance testing not integrated into CI/CD; regression detection requires manual benchmark execution.
perf/ benchmark suite
Code metrics
Static analysis on sampled source files (up to 15 files).
Avg Cyclomatic Complexity5
Counts if/for/while/switch/catch/ternary branches
Errors / Warnings0 / 24
Secrets, empty catches, console.log, var usage, long lines
Largest File Analyzed84 lines
test.js