The complexity package is a very useful one for a Computer Scientist. Recently, I've discovered the xspace package, which provides the \xspace macro that helps defining macros that do not need the \ escape to avoid globbing a subsequent whitespace:
\newcommand{\myname}{Nicola\xspace}
...
\myname is walking on the street % No need to write \myname\ or \myname{}
Now, I use a lot of commands from the complexity package, which defines tens of commands that are commonly used inside text so that the need of escaping is very frequent. I would like to have them use \xspace by default, but redefining, say, \ComplexityFont does not work, because apparently \xspace must be put exactly at the end of the macro being invoked (not a macro expanded from it). The package defines all its macros with simple \newcommands, so I don't think there is a way to hook into it.
Is this redefinition possible to automate in some way, or should I suggest this feature to the package author directly?

\xspacecause problems in math mode? If not, it could still be a nice thing to do. – Nicola Gigante Feb 18 '16 at 09:37\xspace. ;-) – egreg Feb 18 '16 at 09:38$\protect\NP$whenever\NPappears in a section title. – egreg Feb 18 '16 at 09:44\xspace, please? :) – Nicola Gigante Feb 18 '16 at 09:48\xspace– egreg Feb 18 '16 at 09:54