  This research develops a well-established analytical solution of the
Einstein-Maxwell field equations. We analyze the behavior of a spherically
symmetric and static interior driven by a charged anisotropic matter
distribution. The class I methodology is used to close the system of equations
and a suitable relation between the anisotropy factor and the electric field is
imposed. The inner geometry of this toy model is described using an ansatz for
the radial metric potential corresponding to the well-known isotropic Buchdahl
space-time. The main properties are explored in order to determine if the
obtained model is appropriate to represent a real compact body such as neutron
or quark star. {We have fixed the mass and radii using the data of the compact
objects} SMC X-1 and LMC X-4. It was found that the electric field and electric
charge have magnitudes of the order of $\sim 10^{21}\ [V/cm]$ and $\sim
10^{20}\ [C]$, respectively. The magnitude of the electric field and electric
charge depends on the dimensionless parameter $\chi$. To observe these effects
on the total mass, mass-radius ratio and surface gravitational red-shift, we
computed numerical data for different values of $\chi$.
