Height is the most critical. As was said no more than 4". Many so called pocket pistols fail in this regard. Kahr seems to be one of the few that have figured this out for 9mm.
If you are looking at it in a store just compare it to something that works such as a Walther PPK. (Not PPK/S)