A general method for the existence of periodic solutions of differential systems in the plane