Scoring System
ViberTest scores your project 0 to 100 and assigns a letter grade. The scoring uses exponential decay with diminishing returns to keep things fair.
Grades#
| Grade | Score | Meaning |
|---|---|---|
| A | 90 - 100 | Excellent — Clean, well-structured code |
| B | 75 - 89 | Good — Minor issues, solid foundation |
| C | 60 - 74 | Needs Work — Noticeable quality gaps |
| D | 40 - 59 | Poor — Significant structural problems |
| F | 0 - 39 | Critical — Major issues across the board |
Severity Penalties#
Each issue deducts penalty points based on its severity level:
| Severity | Base Penalty | Scaling |
|---|---|---|
| critical | 5 pts | Linear — every instance fully counts |
| high | 3 pts | Logarithmic — log2(count + 1) |
| medium | 1 pt | Logarithmic — log2(count + 1) |
| low | 0.5 pts | Logarithmic — log2(count + 1) |
| info | 0 pts | No penalty |
Diminishing Returns#
Having 15 medium issues from the same rule shouldn't crush your score the same as 15 critical issues. ViberTest uses a logarithmic curve for non-critical severities:
penalty = base_points × log2(count + 1)The first few instances of a rule matter most. Additional ones have decreasing impact. This keeps scoring fair while still rewarding cleanup.
| Issues from one rule | Critical (5 pts each) | Medium (1 pt, log2) |
|---|---|---|
| 1 | 5 pts | 1 pt |
| 5 | 15 pts (capped) | 2.6 pts |
| 15 | 15 pts (capped) | 4 pts |
| 50 | 15 pts (capped) | 5.7 pts |
Per-Rule Cap#
Each individual rule is capped at 15 penalty points maximum. This prevents a single noisy rule from tanking your entire score.
Final Score Formula#
The final score uses exponential decay:
score = max(10, round(100 × e^(-totalPenalty / 60)))The minimum score is 10 — even the worst codebase gets some credit for existing.
| Total Penalty | Score | Grade |
|---|---|---|
| 0 | 100 | A |
| 10 | 85 | B |
| 30 | 61 | C |
| 60 | 37 | F |
| 90 | 22 | F |
| 120+ | 10 | F |
Practical Example#
A project with these issues:
- 1 critical issue (hardcoded secret) = 5 pts
- 3 high issues (dead code) = 6 pts (3 × log2(4) = 6)
- 8 medium issues (console.log) = 3.2 pts (1 × log2(9) = 3.17)
Total penalty: 14.2 pts
Score: 100 × e^(-14.2/60) = 79 — Grade B