How can I select small groups, not small objects?

I’m working with multiple groups with various sizes.
I wish to remove small groups (smaller than 5mm), but when I run ‘selsmall’, it selects individual objects not groups.

Is there a way to either

  1. select small groups
  2. select groups that includes already selected items? (this way I can remove groups that has very small components)

Hmmm - so are you looking for the group as a whole to be physically small, so to speak, or to contain objects that are small, or?