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.
For Safari and Flash, this check is more accurate
The Mac App Store revolutionises the way apps are installed on a computer — it happens in one step. Enter the same iTunes password you use to buy apps and music on your iPhone, iPad, Mac or iPod touch. Within seconds, your new app flies to Launchpad, ready to go. So you can spend more time enjoying new apps and less time installing them. The deceptively powerful app puts a premium on speed and efficiency, offering a clean, lightweight interface that lets you breeze in and out of.
Mac App For Cleaning Up Hard Drive
App clean free download - Clean, Memory Clean, BlueStacks App Player, and many more programs. Uninstall apps from your Mac and clean all.
Fixed Saved Passwords not being cleaned in Firefox v80; Accessibility. Greatly improved support for NVDA and JAWS screen readers so that people with visual impairment who use assistive technology can navigate quickly and intuitively through the app.
Most of those cleaning programs are junk, especially MacKeeper.
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
Best Apps For Cleaning Mac Free
Use Launchpad to delete an app
Launchpad offers a convenient way to delete apps that were downloaded from the App Store.
To open Launchpad, click it in the Dock or open it from your Applications folder. You can also pinch closed with your thumb and three fingers on your trackpad.
If you don't see the app in Launchpad, type its name in the search field at the top of the screen. Or swipe right or left with two fingers on your trackpad to show the next or previous page.
Press and hold the Option (⌥) key, or click and hold any app until the apps jiggle.
Click next to the app that you want to delete, then click Delete to confirm. The app is deleted immediately. Apps that don't show either didn't come from the App Store or are required by your Mac. To delete an app that didn't come from the App Store, use the Finder instead.
Deleting an app doesn't cancel any subscription you may have purchased with that app. Learn how to cancel subscriptions for apps that were downloaded from the App Store.
Use the Finder to delete an app
Locate the app in the Finder. Most apps are in your Applications folder, which you can open by clicking Applications in the sidebar of any Finder window. Or use Spotlight to find the app, then press and hold the Command (⌘) key while double-clicking the app in Spotlight.
Drag the app to the Trash, or select the app and choose File > Move to Trash.
If you're asked for a user name and password, enter the name and password of an administrator account on your Mac. This is probably the name and password you use to log in to your Mac.
To delete the app, choose Finder > Empty Trash.
Learn more
To use an app again after deleting it, either reinstall it or restore it from a backup.
To reinstall apps that were installed as part of macOS, reinstall macOS. This applies to apps such as Safari, iTunes, Books, Messages, Mail, Calendar, Photos, and FaceTime.
You can also redownload apps, music, movies, TV shows, and books that were installed from the App Store, iTunes Store, or Apple Books.
Learn how to delete apps on your iPhone, iPad, and iPod touch.
Cleaner App Mac
Learn what to do if the Dock contains an icon with a question mark.