How do you check that something is vertical?
Hold the phone flat against the surface. The whole back of the phone should touch it, with the screen facing you and the top edge upward.
Tap Check Plumb. The dashed line represents the surface, and the weight hangs straight down. The gap between them is the lean.
Plumb means vertical. It is the direction a weight on a string points.
Floors and shelves are levelled. Walls, posts and door frames are plumbed. It is the same measurement turned ninety degrees.
How much lean is acceptable?
Building standards use millimetres per storey rather than degrees, because millimetres are what you can check with a straightedge.
Brickwork is usually allowed 3 to 5 mm over a height of 2 m. Door frames need to be closer than this. A frame that is 2 or 3 mm out can make a door swing shut on its own.
If a wall looks straight but reads out of plumb, check what the phone is touching. A camera bump, a lump of plaster or a skirting board will hold the phone away from the surface.
Take readings at three heights and use the number that appears twice.