1) Initially I thought to use DOM functions, explode() and str_replace() instead of preg_replace() function, but the code gets bigger and run slower. This is why I decided to keep code clean and use preg_replace() — in this case it does not play a major role in terms of performance, because messages are processed only when they are saved (not when displayed) and only if they contains a # symbol. Also, the preg_replace() function becomes slower when are used large volumes of data, but, as rule messages are not such. So, do not worry about performance ;)
2) Thanks for a great idea. Soon I’ll publish a new version of the plugin.