It is of current interest to understand the electromagnetic response of different nanostructures. In this study, we focus on the role of geometry, in the so-called static limit. In this limit, the incoming wavelength is much greater than the relevant scales of the object, retardation can be neglected, there are no inductive effects, and the electric and magnetic problems decouple, thus one studies plasmonic and magnonic responses separately. In particular, it is of interest to study enhancements of the fields associated with geometric features of the samples as well as the development of artificial structures that may show desired behaviors. With this in mind, in this work, we study a structure with a periodic geometric perturbation that shows a behavior of interest: plasmons and magnons propagate in it with band gaps associated with the geometry, i.e., they may be controlled by design. The structures in question are dielectric or ferromagnetic thin films whose surfaces are modulated periodically in one direction: we study modes of infinite wavelength along the nonmodulated direction. The results are analogous to those found for electronic wave functions in periodic potentials, i.e., one can introduce a reduced Brillouin zone scheme to describe the modes (its width is $2\ensuremath{\pi}/A$, with $A$ the period of the geometric perturbations), which are of the Bloch type. Different bands are identified, and they are calculated numerically. For small geometric perturbations, we develop a perturbation theory that agrees well with our numerical results, and we do obtain analytic expressions for the band gaps at the edges of the Brillouin zone (proportional to the amplitudes of the geometric perturbation of the surfaces and very simple in the case of plasmons). The underlying theory used to calculate the modes was previously developed and relies on solving integral equations along the edges of the sample for the electrostatic and magnetostatic potentials, respectively. Interesting features of this method are that it is practical and computationally nonintensive, film perturbations of arbitrary shapes and amplitudes can be addressed, and it merges in one framework the study of magnons and plasmons.