How do I fix the "sleep wake failure"

Ever since I accidentally installed a program that was malware, I’ll randomly notice my computer rebooting on its own. I used Malwarebytes to delete the malware, but, it still seems like macOS 10.11.6 will have the sleep wake failure issue fairly frequently. Is this a hardware problem or a software issue?

crwdns2934089:0crwdne2934089:0 crwdns2934093:0crwdne2934093:0

crwdns2934109:0crwdne2934109:0

crwdns2889612:0crwdne2889612:0 1

crwdns2942205:01crwdne2942205:0:

I would check the battery and the charging logic. I like this one CoconutBattery. Take a snapshot and post it here for us to see Adding images to an existing question

crwdns2934271:0crwdnd2934271:0crwdne2934271:0

crwdns2934285:0crwdne2934285:0