Optimize the implementation of plugin twitter.