Forums Feature Requests Thread

[Enhancement] Cross-cutting infra: Orphaned template: stats/leaderboard.php (StatsController renders leaderboard/week instead)

Patrick Bass · Jun 6 · 14 · 1 Locked
[Normal Priority] [Feature Enhancement] [Deployed to Production]
🚀 OP Jun 6, 2026 8:05pm

Area: Cross-cutting infra (audit p14) · Surface: platform/templates/stats/leaderboard.php · Dimension: deadcode · Severity: minor

templates/stats/leaderboard.php has zero inbound render references. The actual leaderboard page is served from templates/leaderboard/week.php (StatsController.php:708) and embedded in stats/index. This stats/leaderboard.php file is a stale leftover.

Evidence

`$ grep -rn "stats/leaderboard" src/ templates/ public/ bin/ --include=*.php` → (empty). StatsController.php render() calls are: line 50 render('stats/index'), line 667 render('stats/online'), line 708 render('leaderboard/week'). The stats/leaderboard.php file (2492 bytes) is rendered by nothing; the leaderboard surface lives in leaderboard/week.php and inline within stats/index.php.

Suggested fix. Delete templates/stats/leaderboard.php.

Filed by the automated tenant-app audit and adversarially evidence-verified. Status: verified. Open — not yet actioned.


Patrick Bass
@mobieus

🚀 Jun 7, 2026 10:24am

Resolved and deployed. Commit ca230723ea.

templates/stats/leaderboard.php deleted — actual leaderboard renders from templates/leaderboard/week.php; zero render references on this file.

Closed as: shipped.


Patrick Bass
@mobieus

Log in or register to reply to this thread.