Context : Aims : We present the analysis of a large sample of gamma-ray burst ( GRB ) X-ray light curves in the rest frame to characterise their intrinsic properties in the context of different theoretical scenarios . Methods : We determine the morphology , time scales , and energetics of 64 long GRBs observed by Swift /XRT without flaring activity . We furthermore provide a one-to-one comparison to the properties of GRBs with X-ray flares . Results : We find that the steep decay morphology and its connection with X-ray flares favour a scenario in which a central engine origin . We show that this scenario can also account for the shallow decay phase , provided that the GRB progenitor star has a self-similar structure with a constant envelope-to-core mass ratio \sim 0.02 - 0.03 . However , difficulties arise for very long duration ( t _ { p } \gtrsim 10 ^ { 4 } s ) shallow phases . Alternatively , a spinning-down magnetar whose emitted power refreshes the forward shock can quantitatively account for the shallow decay properties . In particular we demonstrate that this model can account for the plateau luminosity vs. end time anticorrelation . Conclusions :