Porting to component architecture of "Statistics" plugin