There are some metrics that you can certainly require. For instance, a maximum threshold on cyclomatic complexity.
A less rigorous option is that you could require regular drops at which point you look at the code and only agree to buy the next drop if the existing drop meets your need.
A less rigorous option is that you could require regular drops at which point you look at the code and only agree to buy the next drop if the existing drop meets your need.