Display Random Post in WordPress Sidebar

We have been using plugins to display random posts on our sidebar. As all may have known, avoiding the use of plugins may decrease the loading speed of any wordpress website. We have started...