From the addon's description:
Macro Toolkit will attempt to shorting your macros without affecting functionality. It does by looking for the shortest options for each command used, removing unnecessary spaces and optionally replacing known common Lua script functions with Macro Toolkit commands. This is more involved than it may sound, so it's worth checking that nothing has been removed that you kinda wanted left alone once you've used this function.
So, from the sounds of it, it does a few things to shorten your macros:
-It checks for wasted white space. For example, if you include a space after a comma or semicolon, it removes it.
-It checks for shorter aliases for any commands you are using. For example "/w" and "/whisper" are the same thing; if you use "/whisper", it replaces it with "/w".
-Just like other addons can create their own slash commands (for example, I use SpartanUI. It adds the slash command "/sui" to bring up its config window.), it creates short slash commands that it replaces common functions. Since I don't know what
functions are replaced, I can't really give examples, but basically, it would involve creating shorter aliases, so that it can do the same sort of thing accomplished by the above change.
However, since its using slash commands created by the addon, any macros affected by this particular change will not function if they're used on a computer without Macro Toolkit, or if you remove the addon. Macros only affected by the first two changes will continue to function, even without the addon.