improve plugin template