Paul is primarily referring to the moral law of the Ten Commandments, but yes even the ancient ceremonial law is good; ‘excellent’ would be an even better translation: very good is implied. The law is perfect; it flows from the character of God; it reflects his own holy character.