Resonance states using the optical potential model. Study of Feshbach resonances and broad shape resonances