Under IMAP, there is one single flag mechanism. So, any information like "new", "seen", "junk", "forwarded" are IMAP flag associated with the message.
To display any tag manually assigned to the message, I'm testing the message against well-known flag values like "flagged", "seen" and so on.
Certainly I've missed some of them, certainly this may not be the slimest way to do it. Ideas welcome
So if you see some flags between [], these are - at this time - just values of IMAP flags that the plugin didn't know in advance and therefore is not able to hide.