If you did not back up your items anywhere you can't get them back. The whatsapp messages should be on the server from them, install the program and logon to it, they should come back. Contacts, if they were saved on the local storage only are gone, same thing for the photos. Usually you can just figure out your contacts from the text messages and re-enter the numbers. Make sure you keep the contacts on your Google Gmail account or on your service provider account and setup some backup to cloud or to your computer regularly.