1st of all, computers don't actually slow down. There's a psychological quirk in the human brain that only makes is seem slower the more we see it.
But, gathering more and more data on a hard drive will cause that drive to work more to read/write data, but we're talking milliseconds if not nanoseconds.
Cleaning stuff out of a computer to make it faster is the oldest rip-off scam in the industry. Clearing out logs, etc, may cause some psychological relief, but nothing technically changes.
First, the logs these apps claim to clear out do nothing for speed. They are self-regulated log files, that only use a predetermined amount of drive space, and clean themselves out regularly.
Defragging a drive on a Mac is so outdated it's not funny. Your OS X Mac, along with the SMART functions in modern hard drives take care of all of this in the background. Don't let anyone fool you into thinking defraging your drive will do anything to help. Well, it helps those shady software developers make money you don't need to spend. Defrag was great for old drives that were slow to start with. Today's drives are simply too fast, too efficient, it doesn't matter any longer.
There are other things it may claim to do like clean out "localization" files. Don't do this. Those are the foreign language files your computer uses to decipher, if not also display foreign languages and their unique characters on your computer screen. They lay dormant, take up next to no drive space, use no RAM, and fooling with them does absolutely NOTHING to improve your system. It could also harm your system if you have software applications that rely on these for references.
Way back when, too many icons on your Desktop would make a Mac noticeably slower, as it meant a larger Desktop catalog loaded into RAM. On newer Macs it makes no difference now, as the Desktop is handled in a much faster, more efficient manner. But, it's a good idea to keep your Desktop tidy, anyway.
As a semi-retired IT engineer, I've seen Mac Cleaner and the like totally trash people's computers. I've seen many folks lose all their data using these rip-off, disgusting, horrible applications and services. Then the company won't lift a finger to help you get your stuff back. They are dangerous, con you into thinking your computer is way slower than it used to be (it's not, no computer gets that much slower from normal, proper use, it's physically impossible). I wish there was a law that could prosecute those thieves.
On a Mac, there are only three things you can do which are preventative maintenance, and don't effect your Mac's speed. First, once a month, from your Desktop highlight each hard drive icon, one at a time, and use Command-i to pull up it's Info window. Read the Capacity and the Available space numbers. Be sure that you always have at least 15% of the drive's total capacity as free space. This is needed by applications and the OS to write and store temporary system files that are invisible to the end users, that helps it do it's work.
Second, once a month run Disk Utility (Applications folder, Utilities folder). In the First Aid tab, highlight each drive by the name you gave it in the Finder, click the Repair button (Verify does nothing, leave it alone). Do that to each drive on your system.
Third, you can run Disk Warrior (third party app) once a month to rebuild the directories on your hard drives.
Aside from that, NOTHING you can do, save delete unused applications and documents, and even that will have the most minimal impact, will make your computer actually run "faster". It runs at a set speed, it does not "speed up" or "slow down". The more complex the task you give it, the longer it may take, as there are more steps to that more complex task. This is not running "slower", this is doing more complex, heavy duty work. Nothing can change that except getting more RAM, or a faster CPU.
Don't touch any of those apps or services claiming to make your computer "faster". It's a total rip-off, and you could lose all of your data. Trust me, I've seen it over and over and over and over.