In this work we extend the approach used in [Emanuel Gallo and Osvaldo M. Moreschi, Phys. Rev. D 83, 12 083007 (2011)] to the study of weak gravitational lensing in a plasma medium. First, we present expressions for the deflection angle and optical scalars in terms of the components of the energy-momentum tensor for spherically symmetric lenses surrounded by a cold nonmagnetized plasma. Second, we show that the same expressions can be deduced using the Gauss-Bonnet theorem. Finally, we establish a correspondence between the spatial orbits of photons in a nonhomogeneous plasma and the nongeodesic curves followed by test massive particles whose dynamics also depend on an external central field. As an application, we use the Gauss-Bonnet theorem to compute the deflection angle of the nongeodesic trajectories followed by relativistic test massive charged particles in a Reissner-Nordström spacetime.PACS numbers: