Hedgehogs are thought to travel on average a mile every night while foraging for food. Photograph: Steve Heliczer/PA

Hedgehogs have been in the news again, with Anne Widdecombe urging the government to give them the same protection as bats and red squirrels, making it illegal to intentionally harm them. I don't know how much difference this move would make to hedgehog populations – they've suffered a 25% decline in the last 10 years, predominantly due to habitat loss – but anything that increases public awareness of the plight of these prickly mammals has to be a good thing.

I asked Sir David Attenborough his views on the matter, at the launch of the Big Butterfly Count. He launched into a charming story of a "dear, three-legged lad" called Hoppity, which used to visit his garden. "I used to feed it", Attenborough told me, "not milk and bread as that can make them ill, but specialist hedgehog biscuits".

Attenborough went on to describe one of the most common problems facing hedgehogs today: "the thing about hedgehogs is that they travel absolute miles. Lovely as it is to have them in the garden, if they've got no corridor to travel along, then they're not going to find enough food to eat – there's not enough food for them in one garden."

It's thought hedgehogs travel on average a mile a night to forage for food. A journey broken by fences forces them out on to the road, where they have to negotiate concrete, pedestrians and cars just so they can enter another garden two doors down. By simply making a small hole under your fence on either side of your plot you will enable hedgehogs to safely travel through the neighbourhood, and make life so much easier for them in the process.

This simple measure has been beautifully demonstrated by the Hedgehog Street campaign, which was launched jointly last year by the British Hedgehog Preservation Society and the People's Trust for Endangered Species. A survey of "Hedgehog Champions" shows that nearly 5,000 gardens have been linked together so far. If everyone opened up their gardens in this way, hedgehogs' chances of survival would improve dramatically. Taking care to ensure that ponds have shallow sides so hedgehogs can exit safely if they fall in, lifting pea netting above ground so hedgehogs don't get tangled in it, and turning the compost in April and not during the breeding season (May to September), can make gardens a lot safer for these beautiful creatures.

"I'm very keen on hedgehogs", said Attenborough. "Have you ever seen one of their nests? Beautiful things, beautifully made. I once found one under a lavender bush". Whether they'll get legal protection or not remains to be seen. But we can all follow Attenborough's example and do our bit for hedgehogs in our gardens, starting today.

Become a Hedgehog Champion in your area, and encourage your neighbours to do the same. Sign up at hedgehogstreet.org.

Kate Bradbury writes and commissions wildlife content for Gardeners' World Magazine and writes a weekly blog on gardenersworld.com. You can read her other posts for the Guardian gardening blog here.