It’s all in the title really: The Doctor’s Wife. Not in its metaphorical description of this episode. But in its celebration of fandom.

As hard core Whoheads know, The Doctor’s Wife is a title too ridiculous to be real. 1980s producer John Nathan-Turner wrote it on a list of forthcoming stories on a white board in the Doctor Who production office in an attempt to sniff out a suspected spy. It’s a false title and it’s pure JN-T; outrageous and provocative, guaranteed to get headlines. Was the mole unearthed? I don’t think so, but the deed was done and it has since gone down in Whostory.

To the not-we, perhaps the title reminds them of The Time Traveler’s Wife, a rather soppy sci-fi romance novel by Audrey Niffenegger, which didn’t do much for me, but which seems to have had an ongoing impact on showrunner Steven Moffat (a copy of the book even made a cameo appearance in Dark Water). But Moffat and writer Neil Gaiman are Who fans down to their question marked socks and would know the Who legend behind the title. They know the fannish jolt of excitement it would generate. It sends an immediate signal to other Doctor Who fans: this one’s for you.

And so it is that before the opening titles have rolled, we get a visit from a prop last seen in 1969’s The War Games. (Funny the little things that stick in your mind. The War Games is 10 episodes long and has made a lasting impression on Doctor Who in many ways. But that tiny little moment where the Doctor boxes up a telepathic message in a self assembling cube is one of its most potent images. It seems deserving of its encore in The Doctor’s Wife.)

Having received the message box, the Doctor (Matt Smith, at his best here, I think) sets course for another universe, and is deleting TARDIS rooms to generate the extra thrust needed. Instantly, we’re recalling Season 18 with its visit to the pocket universe of e-space and its gloomy finale Logopolis. The fourth Doctor’s curtain call is keenly referenced here, when companions Amy (Karen Gillan) and Rory (Arthur Darvill) lose themselves in the TARDIS corridors, just like their predecessor Tegan. And like Tegan, they discover the TARDIS can quickly switch from being a place of refuge to one of peril.

When the TARDIS lands, it’s on an asteroid, and more specifically, in a junkyard. A police box in a junkyard; a salute to one of the show’s most iconic images. And this planet is a graveyard for spaceships, and is inhabited by beings sewn together from the remains of others. It’s The Brain of Morbius via 100,000 BC.

But amongst all this nostalgic throwbackery is a startlingly novel idea, that the TARDIS takes on humanoid form. It does this when its ‘soul’ is poured into the body of woman, Idris (a brilliant turn from Suranne Jones, with more than a little of a dishevelled Helena Bonham-Carter about her). We only see Idris for a moment before she is erased and replaced with the Doctor’s ship. We have no time to wonder who she is, or what misadventure brought her to this sad asteroid or indeed why she is the only one like her around. But she wears a blue dress and her name is tantalisingly close to ‘I, TARDIS’.

So the TARDIS walks and talks in this story, a truly new idea for the series. But even this is an opportunity to look back at the series’ past and put long held conventions into context. Now that the TARDIS can talk we discover, for instance, that all those years ago the Doctor did not merely steal the TARDIS, but that it also stole him. That the Doctor has been too busy pushing those TARDIS doors open to notice that the notice on the front says ‘pull to open’. And – my favourite – that the TARDIS’s seemingly erratic navigation is a front for a machine with its own ideas about destinations. ‘You didn’t always take me where I wanted to go,’ complains the Doctor at one stage. ‘But I always took you where you needed to go’, Idris coolly replies. Hundreds of past plot conveniences made sense of in two neat sentences.

The Doctor and Idris set about building a working console from the scattered remnants of dead TARDISes. Here, Gaiman specified that it should resemble the TARDIS console of his favourite Who era, the late ’70s. But fans will remember that the Doctor travelled by console only in Third Doctor epic Inferno. Meanwhile, Amy and Rory are in their own rerun of Inside the Spaceship, trapped inside the ship and assaulted with mind games. Or perhaps it’s The Invasion of Time, running for their lives through those labyrinthine corridors.

The mental shenanigans are thanks to House (creepily voiced by Michael Sheen), the disembodied entity which formerly inhabited the asteroid. Its name is significant; once inside the TARDIS it is inhabiting the Doctor’s home, as close a thing to a house as he’s ever had. The planet which is actually a living being reminds us of Planet of Evil, but there’s also this aside from Destiny of the Daleks, which might have sparked a young Gaiman’s imagination.

DOCTOR: (reading from a book) “‘The conditions existing on the planet Magla make it incapable of supporting any lifeform.’… He obviously doesn’t realise the planet Magla’s an eight thousand mile wide amoeba that has grown a crusty shell.”

It pays homage to the new series too, with the thrifty presence of an Ood nodding to the Russell T Davies era. And when our team reunites towards the end of the episode, they do so in the console room used by Doctors Nine and Ten (oh, and it’s nice to have it back. That original Eleventh Doctor one was like every crazy idea ever had thrown at a set. The Doctor Who equivalent of the Homer Simpson designed car.)

The Doctor tricks House into deleting that old console room (more’s the pity) on the premise that it will delete the Doctor and co too (and hello to you too, Castrovalva). But as it turns out there’s a little cheat coming. Turns out, when deleting rooms living organisms within get deposited in the console room, from where the TARDIS’s original soul can evict the cookoo from its nest. It’s a little too cute to solve the story’s problem with a hitherto unmentioned TARDIS trick, but there you go.

Idris returns briefly in ethereal form to say, in a typically topsy turvy way, hello. Doctor and TARDIS will never speak again. It’s enough to move the Doctor to tears, and we see then that the title is more than just a fannish reference, but a real acknowledgement that these two are their own, sole constant companions. It’s the end of a particularly memorable ride.

With all done and dusted, the Doctor prepares to take his friends for a holiday. His destination, familiar to anyone who knows The Five Doctors, is the Eye of Orion. It’s a fitting end for what has been the series’ most heartfelt love letter to itself.

LINK to The Lazarus Experiment. Both are directed by prolific new series director Richard Clark.

NEXT TIME… Disgusting! Prepare to be Drahvin mad by Galaxy 4. No, Rilly.