Edit: This hasn’t been updated since 1.5.1, but may work with 1.6. Please let me know in the comments.
Short post, but I have thrown together a short plugin for YOURLS (using a lot of the code from http://gkurl.us/popular) that shows the most popular links created in 1,30,365, and 1000 days on a YOURLS site. It’s based on code from Mrtech, but is now in the form of a plugin.
Download here, save as plugin.php and upload to YOURLS_DIRECTORY/user/plugins/popular-links
At the bottom of the plugin, you can edit the values
1000 means the number of days you are selecting from the database
5 means the number of links you are selecting.