  We employ the phenomenological Lawrence-Doniach model to compute the
contributions of the superconducting fluctuations to the third-harmonic
magnetic response, denoted here by $\overline{M_{3}}$, which can be measured in
a precise way using ac magnetic fields and lock-in techniques. We show that, in
an intermediate temperature regime, this quantity behaves as the third-order
nonlinear susceptibility, which shows a power-law dependence with the reduced
temperature $\epsilon=\frac{T-T_{c}}{T_{c}}$ as $\epsilon^{-5/2}$. Very close
to $T_{c}$, however, $\overline{M_{3}}$ saturates due to the nonzero amplitude
of the ac field. We compare our theoretical results with experimental data for
three conventional superconductors -- lead, niobium, and vanadium -- and for
the unconventional superconductor Sr$_{2}$RuO$_{4}$ (SRO). We find good
agreement between theory and experiment for the elemental superconductors,
although the theoretical values for the critical field systematically deviate
from the experimental ones. In the case of SRO, however, the phenomenological
model completely fails to describe the data, as the third-harmonic response
remains sizable over a much wider reduced temperature range compared to Pb, Nb,
and V. We show that an inhomogeneous distribution of $T_{c}$ can partially
account for this discrepancy, since regions with a locally higher $T_{c}$
contribute to the fluctuation $\overline{M_{3}}$ significantly more than
regions with the "nominal" $T_{c}$ of the clean system. However, the
exponential temperature dependence of $\overline{M_{3}}$ first reported in Ref.
[3] is not captured by the model with inhomogeneity. We conclude that, while
inhomogeneity is an important ingredient to understand the superconducting
fluctuations of SRO and other perovskite superconductors, additional effects
may be at play, such as non-Gaussian fluctuations or rare-region effects.
