Good legal theory should be similar in make-up to good scientific theory. It should be objective, have reach, be hard to vary and be able to withstand falsification.
Laws should be objective because this avoids problems with discrimination and also tells the citizens of a country exactly what they are not permitted to do. A good example of an objective law is criminalising murder outside of self-defence, because it is equally applicable to all citizens and sets clear boundaries for what an individual may not lawfully do. A subjective set of laws would be antitrust laws because they discriminate against larger corporations and also don't make it clear what business practices are and are not legally permitted.
Laws should have reach because this is an indicator that they are non arbitrary and when they withstand criticism are more likely to be true. As legal theory, outlawing practices which involve the initiation of force have reach because we can apply this across the board with tremendous success. Tax laws by contrast lack reach, because they have very specific jurisdiction and are frequently having to be amended.
Being hard to vary is a good quality for a law because this decreases ambiguities in its being upheld. A ban on the sale of nuclear weapons is a law which is hard to vary because its intentions are clearly and explicitly stated. Saying that congress may sometimes interfere with commerce is incredibly vague by contrast and has led to wildly different interpretations.
It's important that a law works in practice. If people are finding all sorts of loopholes then this is an indication that the law needs revising, it has been falsified as a useful legal measure. Laws against female genital mutilation are very tightly worded and stringently enforced meaning that is almost impossible to get away with it. By contrast, drug laws often have all sorts of loopholes which leads to them being flouted.