I've always developed my own applications and use certain criteria to evaluate if the code is acceptable from a quality perspective. Now I've switched jobs and have to among other things maintain existing software.
Here they put most of their business logic in stored procedures. This in itself I see as a bad practice, but it's the hand I'm dealt with regardless. Now I've seen them using stored procedures that contain more then 2k LoC excluding comments and if I would apply that to a method in Java/C#/C I would give it a big fat minus minus rating.
But then again should I see a stored procedure as an method for using quality metrics? You could argue for example that stored procedures uses more LoC to realize something and you should take that into account. But then again if the same method consists of 20 lines of code in Java/C# and in a stored procedure it consists of 50 lines I feel like I should take it into account as it decreases the readability of the procedure.
Should I use the metrics as described in https://www.researchgate.net/publication/4276839_A_Practical_Model_for_Measuring_Maintainability to see if the code is acceptable from a maintainability perspective? These are: LoC, Cyclomatic complexity, Unit Size, Duplication, Testability (where unit size refers to a method and LoC to total lines of code for a class).
Or should I use different quality metrics to see if the stored procedures are acceptable from a quality perspective? testability can be scrapped in any case as there are no tests as far as I'm aware of here.