Mac's don't need defragging as OS X automatically writes 2Gb or below sized files to one contiguous space on the drive. There are certain cases where's it's needed to free up a large spaces on the drive, but not something everyone has to do.
Far as other Mac maintainence, there really isn't any except to backup one's files regularly. Keeping Software Updated and run a web browser check to make sure the plug-ins are current.
App clean free download - Clean, Memory Clean, BlueStacks App Player, and many more programs. Now that you know how to clean MacBook on the outside, you can also easily keep the inside clean and tidy with the help of apps like Declutter, Bartender, and CleanMyMac X. The best part is you can use all those apps (plus 150 more) free when you sign up for a seven-day trial of Setapp, the best app platform to keep your Mac life productive.
Best App To Clean Mac 2015 Download
For Safari and Flash, this check is more accurate
Best Free Mac Cleaner App
Most of those cleaning programs are junk, especially MacKeeper.
Best App To Clean Mac
If your friend got onto your computer and visited a bunch of adult sites, then I would recommend something like OnyX, doing ALL the cleaning and maintenance aspects and rebooting, perhaps followed by a Disk Utility Erase free space.
CCleaner beta is out for OS X, used on PC's and combines cleaning and scrubbing of the drive if setup correctly.
If your interested in performance, read my post here