We present a concise analytical model which links the statistics of undulator field error to statistics of synchrotron radiation intensity. In particular, we show how undulator errors affect the phase of electron motion inside an undulator and express radiation intensity in terms of phase error statistics. Effect of trajectory and phase compensation are discussed. It is demonstrated that phase error is a more reliable descriptor of undulator quality than magnetic field error. The theory is directly applicable to synchrotron radiation devices and small-signal FEL's, and can be also extended to strong-signal FEL's.