convert readlastposts plugins to doctrine