A simple and accurate novel normal mode analysis has been developed to take into account the effect of the non-uniform depth of polishing in the study of the transmission characteristics of optical waveguide devices based on loading of a side-polished fiber half-coupler with a multimode planar waveguide. We apply the same to design and fabricate a gain-flattening filter suitable for fiber amplifiers. The wavelength dependent filtering action of the overall device could demonstrate flattening of an EDFA gain spectrum within ±0.7dB over a bandwidth of 30nm in the C-band. Results obtained by the present analysis agree very well with our experimental results. This present analysis should be very useful in the accurate design and analysis of any SPF-MMOW device/component including side-polished fiber based sensors.