  We prove that a critical metric of the volume functional on a $4$-dimensional
compact manifold with boundary satisfying a second-order vanishing condition on
the Weyl tensor must be isometric to a geodesic ball in a simply connected
space form $\mathbb{R}^{4}$, $\mathbb{H}^{4}$ or $\mathbb{S}^{4}.$ Moreover, we
provide an integral curvature estimate involving the Yamabe constant for
critical metrics of the volume functional, which allows us to get a rigidity
result for such critical metrics.
