Characters
C’mon, princess, you’re not that ugly. All right, you are ugly. But you’re only like this at night. Shrek’s ugly 24/7.
— The Donkey • Shrek

Behind the line May contain spoilers.
Our reading
An editorial interpretation.
The speaker teases a princess by first softening, then conceding she is ugly, before pointing out that her ugliness comes only at night. Someone else, called Shrek, is ugly around the clock. The comfort is backhanded, mixing insult with a comparison meant to make her look better.
Context reviewed