We consider finite energy solutions for the damped and driven two-dimensional Navier--Stokes equations in the plane and show that the corresponding dynamical system possesses a global attractor. We obtain upper bounds for its fractal dimension when the forcing term belongs to the whole scale of homogeneous Sobolev spaces from -1 to 1