You are required to have 10 Hours P1 upon application for the rating. See
http://www.caa.co.uk/docs/175/srg_fcl_gid15.pdf
So it can be done after the IMC rating test has been completed. But the wisdom of doing the IMC Rating with so little P1 time is a bit dubious. 10 Hours P1 is not very much at all. I can understand you not wanting to let you finely honed skills atrophy and die before doing the rating, and to get the benefit of the rating as quickly as possible, but I would have thought you would have benefited from a little VFR consolidation first.