If your going to use a plug, use a Twist-Loc style plug and receptacle. Compressor vibrations won't cause it to loosen and fall out.
If you hard wire to a shut off, try and get a shut-off that can be fused for added protection.
Ideally it would be nice to have both... IE: A fused shut-off switch, supplying a receptacle.


P.S. Any particular reason why your using a UF cable?