You should merge this method with _similarAttribute() to one common _getAttribute() method, that either returns the existing one or a new one. You can also use getAttribute() of the Order-Product item to find attributes more quickly