improve code before release version 1.2.0 plugin

Signed-off-by: TomWu <phperwuhan@gmail.com>