#2675·YOURLS

Improve stat pages

Author: ozhCreated May 3, 2020Updated Sep 24, 2025
Labelsenhancement

Stat pages are a complete shitshow exposing how bad I was at mysqling things 10 years ago (not saying I've really improved in that area :)

Problems:

  1. Code has been ugly for years

  2. Code doesn't easily allow smarter plugins to take over (I think that's probably a reason why there are no stats plugin)

  3. This page is pulling every info from the DB in a few queries then doing PHP stuff to rearrange and display. While this is fine for a couple thousand hits, it quickly becomes completely unpractical, if not just failing, when days and/or hits add up.

  4. This page displays just everything. Again, why not for a couple hits, but this has probably no value to anyone: image

Maybe we should have a more simple page and have the "details" loaded on demand by ajax.

Any suggestion or PR welcome.