Hey,
This is a great mod in general and i really like it but there is one problem and it is on the performance side.
In your code, you're adding 2 sql queries for each post, one for the flag and the other for the credits, which is really a lot. just look at page 1 of this topic and you'll see that there are 57 queries being made where 30 of them are for the flags and credits.
Don't get me wrong, i really like this mod, that's why i love to see it improve more.
Thank You.