Common envelope evolution (CEE) is vital for forming short-orbital-period compact binaries. It covers many objects, such as double compact merging binaries, Type Ia supernovae progenitors, binary pulsars, and X-ray binaries. Knowledge of the common envelope (CE) ejection efficiency still needs to be improved, though progress has been made recently. Short-orbital-period hot subdwarf B star (sdB) plus white dwarf (WD) binaries are the most straightforward samples with which to constrain CEE physics. We apply the known orbital period–WD mass relation to constrain the sdB progenitors of seven sdB+WD binaries with a known inclination angle. The average CE efficiency parameter is 0.32. This is consistent with previous studies. However, the CE efficiency need not be constant, but a function of the initial mass ratio, based on well-constrained sdB progenitor mass and evolutionary stage. Our results can be used as physical inputs for binary population synthesis simulations of related objects. A similar method can also be applied to study other short-orbital-period WD binaries.