No it needs to be properly enclosed. Rats and voles and things will easily squeeze through a crate.
Please be absolutely certain you can give the time and commitment to hens before you go ahead with it. We have just come to the end of our time having hens as our remaining hen has passed away, and we won't be getting more sadly. It was so much harder than we thought.
I didn't realise that chickens meant attracting rats, nor that if you don't clean up after them diligently every day they attract flies - in fact as chickens pretty much eat and shit constantly there will always be a lot of flies.
This meant that we didn't really use our garden ourselves as much - not that pleasant having your garden constantly smell of poo and full of flies. You can clean up chicken poo every day and still there will be flies.
They will also destroy your lawn and any plants or grass they have access to, so unless you're penning them in your garden will become the barren surface of the moon in summer, and a disgusting muddy bog in winter.
You also need to read up on the various illnesses chickens can get and be very observant of their behaviour and living conditions- one year we spent the summer constantly combating red mite which is a bastard to get rid of.
Hens are lovely and sweet, I loved them and really enjoyed keeping them, but they can be fucking hard work, it's awful when they get sick, sometimes they fight and attack each other and you have to intervene, and they'll trash your garden.
Oh, and in summer they'll wake you up at 4.30 am when the sun starts to rise earlier because they think sunrise = loud clucking and squawking to greet the day!