That deep yellow substance isn’t pee, it’s hemolymph–essentially, insect blood. When frightened, a ladybug will “reflex bleed”; hemolymph will be excreted from its legs. The smell is meant to turn off predators. Ladybugs do not generally eat plants, they eat smaller insects like aphids and scale.