Extract commong things from the plugins

The patch also allow to skip common things for new plugins, just
define these functions as NULL