It's recommended the compressor is directly plugged into the wall outlet.  If an extension cord is needed, consider a longer air hose.