update plugin, clean model when the data is deleted by the user