Yes, this script does a fine job of selecting the smallest EDB, not the database with the least amount of mail and/or mailboxes. This would work well if you do not have quotas and your whitespace is small.
For those of you that may want to use this script, remember that a provisioning system would want to know the MB store with the most space and would not care if the EDB is large with a lot of white space. In that scenario it would be better to do a running sum on the mailbox quota for each mailbox in the MB store and use that sum as your comparison value. It can be simplified more if all mailboxes in a store have the same quota; then it is mailbox count times quota.