how to show the most viewed, random and recent posts in the home?

I’ve implemented this before with custom queries and widgets. You have to be tracking all of these stats, of course, but if you are, it’s a rather simple matter to build a widget that displays it and drop it in. If you’re not using widgets, you can do the same, it will just take a bit more coding on your part, but use the same concept. Without specifics, I don’t think I can go much deeper on implementation for most viewed, but I can give you the other two.

To get random posts, you can just do a get_posts() query with your orderby set to rand and everything else set as normal, voilà , random posts.

Same deal for most recent posts, get_posts(), set your order_by to post_date and your order to DESC…which is actually the default behavior for get_posts().

Docs: get_posts()