M-class planets