Aims. To estimate the compactness of the thermally emitting isolated neutron star RX J0720.4−3125, an X-ray spin phase-resolved spectroscopic study is conducted. In addition, to identify the genuine spin-period, an X-ray timing analysis is performed. Methods. The data from all observations of RX J0720.4−3125 conducted by XMM-Newton EPIC-pn with the same instrumental setup in 2000-2012 were reprocessed to form a homogenous data set of solar barycenter corrected photon arrival times registered from RX J0720.4−3125. A Bayesian method for the search, detection, and estimation of the parameters of an unknown-shaped periodic signal was employed as developed by Gregory & Loredo (1992). A number of complex models (single and double peaked) of light curves from pulsating neutron stars were statistically analyzed. The distribution of phases for the registered photons was calculated by folding the arrival times with the derived spin-period and the resulting distribution of phases -approximated with a mixed von Mises distribution -, and its parameters were estimated by using the Expected Maximization method. Spin phase-resolved spectra were extracted, and a number of highly magnetized atmosphere models of an INS were used to fit simultaneously, the results were verified via an MCMC approach. Results. The phase-folded light curves in different energy bands with high S/N ratio show a high complexity and variations depending on time and energy. They can be parameterized with a mixed von Mises distribution, i.e. with double-peaked light curve profile showing a dependence of the estimated parameters (mean directions, concentrations, and proportion) upon the energy band, indicating that radiation emerges from at least two emitting areas. Conclusions. The genuine spin-period of the isolated neutron star RX J0720−3125 derived as more likely is twice of that reported in the literature (16.78s instead of 8.39s). The gravitational redshift of RX J0720.4−3125 was determined to z = 0.205 +0.006 −0.003 and the compactness was estimated to (M/M )/(R/km) = 0.105 ± 0.002.