We have performed the study of the phase transition of an effective model of fermions describing interactions between quarks in dimensions, taking into account effects induced by the finite size of the system, with periodic, quasiperiodic, and antiperiodic boundary conditions (PBC, QBC, ABC, respectively), chemical potential, and an external electromagnetic field. This has been done by generalized Matsubara formalism. Through the proper-time representation, the electric, magnetic, temperature, chemical potential, and finite size effects are written in terms of well-knowing functions and Jacobi theta functions. The gap equation of the system is numerically solved and we show the behavior of the system when the thermodynamic parameters of the model are changed. For fixed finite sizes, one of the findings is that the broken chiral symmetry is enhanced by the magnetic field increasing, but for the increasing electric field, we have the restoration of chiral symmetry. In fixed external fields, the influence of on the phase transition is not unique: ABC conditions tend to restore chiral symmetry, while PBC conditions improve the broken phase and the QBC conditions have intermediate behavior, considering the same range of temperatures and decreasing. We also observed little influence of finite chemical potential on the phase structure of the system and a minimal critical size of the system for ABC but not for QBC or PBC cases.