Writing efficient code is not always easy. There are plenty of folks who write scripts that can be reused and do wonderful things. But it takes talent and effort to develop scripts that are as efficient as possible. Take sorting WordPress posts for instance. Some developers don’t have trouble making multiple identical queries in their code. Why do that when you can use Sort Query Posts to sort your posts without making more queries than you have to.
The plugin is pretty easy to use. It essentially saves you from having to run multiple queries to sort your posts. Posts can be ordered by author, comment_count, date, id, menu_order, modified, parent, and title.
This script is especially helpful if you want to show the same content in multiple places on your pages. The function is fairly easy to use and can improve the performance of your code. The code is lightweight which helps.