Theory:

The speaker begins the poem by stating how there is a shed in his garden.

There is a shed at the bottom of the speaker's garden

The shed, located near the end of the garden, looks frightful. One may find a spider's web across the door. The presence of a spider’s web across the door shows that it is rarely used, and it is more of a deserted building.

A spider's web hanging across the door

Moreover, the hinges of the door are affected by rust, and as a result, it creaks in the wind.

A hinge of a door

The speaker says that he could hear the creaky noise when he is lying in his bed. Here, the speaker can be seen talking about how he is "in" the bed rather than "on" the bed. Both are grammatically correct, but they suggest two distinct meanings.

Lying "in" the bed would mean that the person is under the sheets. That is, he or she is covered with blankets, and hence, he/she is "in" the bed. This phrase would suggest that the person has been spending, or is planning to spend, some quality time in it and that the person is seriously considering getting some sleep. However, lying "on" bed suggests that though he/she is lying on it,  they are expected to move out of it soon.

So, coming back to the poem, the speaker is lying in bed, and he hears the noise from the shed. The line, "when I’m in bed I lie and I listen", suggests that the time is night. It is night, as he is all set to sleep. Also, since it is night, the silence in the atmosphere lets the sound travel relatively easily to his room.

As he listens to the sound, he promises himself that he would open the door one day. The place doesn’t seem to be frequented, and he is curious to find out what lies behind the door. However, the stanza suggests that the speaker’s wild imagination had caused fear and suspicion in him.

The speaker further describes the shed in the second stanza. Apart from the rusty hinges on its door, the shed has a window at the side. It is old, dusty, and damaged. The line "three cracked panes of glass" provides more details of the shed; the shed has a broken window, and it has three cracked panes. It doesn't mean that the window had only three panes of glasses, but rather, the three of the panes were cracked.

A cracked pane of glass

Speaking of the line, "with three cracked panes of glass", it is interesting to note that the poet had stated that there were 'three' damaged sheets of glass. So why did he use the number three? And why not any other number?

Well, it is understood that the number $$3$$ had played a significant role in literature and culture. Several of the folktales and literary works had 'three' in them. "Three Little Pigs", "Goldilocks and the Three Bears", "The Three Musketeers", "Three Men in a Boat", and "The Three Questions" are some of the famous stories that have the number in the title.

Moreover, the concept of three wishes, three choices/options, three chances, Trimurthi, and Trinity are noteworthy. Also, remember the 'three witches’ from Shakespeare's "Macbeth", or the 'three ghosts' from Dickens' "A Christmas Carol"? And not to forget the movie, "The Three Idiots".  There is more to the number three, such as the Rule of Three. Hence, the number three is popular, heavily used, and easily accessible in language, literature, and culture.

Back to the poem, the speaker says how he often felt that someone was staring at him through the window whenever he went by it. The speaker is obviously scared, for we hear him say in the following line that he would "peep" through the window one day. In the earlier stanza, the speaker had expressed his resolution to 'open the door'; however, we see that it is getting weakened. He doesn't wish to open the door anymore; instead, he would be happier with a mere peep, and that too, through the window. The transition is clear: from "open" to "peep" and from "door" to "window".

The line "I’ll peep through that window one day" can be seen as a refrain with modification.

The third stanza of the poem introduces a new character: the speaker's brother. The poet's brother had told the speaker that there is a ghost inside the shed. The ghost is not visible to everyone's eyes as it is hidden under the floor. Also, the brother had warned the speaker that the ghost would jump out of its hiding place and pounce on him the moment he steps inside. Additionally, the brother said that the ghost would chop his head off if it sees him entering the shed.

There is a ghost in the shed, says the brother

The very idea of a ghost would probably have thrown the seed of fear in the speaker. Also, the shed’s appearance (the old, mysterious, and dusty look) would have built the same.

Again, the stanza ends with a modified refrain. The speaker is evidently scared of setting his foot inside the shed, so he says that would take a peep someday. Neither is he going to open the doors and nor is he going to look secretly through the windows. On the other hand, he will take a quick look, and more likely from a safe distance. Though the speaker is afraid, he also has the desire to see and explore the shed.

As seen in the previous stanzas, the speaker had the desire to visit the shed. However, he had certain misgivings; the spider's web, the door that creaks, the feeling that someone staring through the cracked window, the possibility of a ghost hiding under the floorboards had frightened the speaker.

So, we see that the speaker is now trying to disregard the misgivings he had in the previous stanzas. For instance, he starts the fourth stanza by saying that there is no ghost hiding in the shed. He knows that his brother is trying to trick him into believing that there is a ghost as the latter considers the shed as his secret hideout. Hence, the brother cooked up the story of a ghost to prevent the speaker from going into the shed.

The speaker also tries to dismiss his other fears by claiming that no one is staring at him through the windows, nor is anyone making strange noises. In the first stanza, we saw how the speaker had described the noise from the shed. Though common sense told the speaker that the noise was from the rusty hinges, his misgivings would have probably let him imagine that the noise was made by "someone" rather than the doors. He then speaks about the spider's web that was hanging across the door. There was nothing to be afraid of as there were no spiders there. The spider has left the place and what remains is its harmless cobwebs.

When speaking of the spider, the speaker knows that it is long gone, but he isn't sure when it had left the place. The line "And the spider has been gone from his web since I don’t know when" reveals two aspects of the speaker's mind: for one, the speaker is sure that the spider had left its web but doesn't know when it happened. On the other hand, the line "since I don’t know when" can also suggest that the speaker isn't convinced by the thought that the spider has left the spot.

By dismissing his fears and doubts, the speaker indeed desires to check out the shed, at least for once. Again, the poet concludes the stanza with the modified refrain. He can be seen convincing himself that 'he would "go" into the shed one day soon'.

Speaking of the refrain, we had observed how the speaker's conviction of visiting the shed had transformed. In the first stanza, the speaker wanted to 'open the door'. Later, he assured himself that he would 'peep through the window'. In the third stanza, we see how the speaker had wanted to 'take a peek' at the shed. The transition is clear; the speaker gave into his doubts and fear and became less confident as the poem progressed. However, there comes a shift in the fourth stanza. He declares that he would "go into that shed one day soon". However, he adds a comma to the refrain and takes his thought further into the fifth stanza.

The short single-line fifth stanza further intensifies the transition of thoughts in the poem. Followed by the refrain from the previous stanza, the speaker says, "But not just yet...". Though the speaker was determined to go into the shed sometime soon, he wasn't ready for the adventure yet. The line reveals that the speaker is affected by the fears, and though he dreams of going into the shed, he couldn't persuade himself to do so. So, he would go, but only when he feels that he is ready to venture in.

Moreover, the stanza ends with 'three dots', formally known as 'ellipsis'. The three dots may imply several meanings. They may suggest 'uncertainty' as the speaker is unconvinced that he would visit the shed anytime soon. Or the dots may indicate hesitation of thought, as the speaker doesn't want to establish whether he would or could go into the shed. Either way, it is understood that the speaker is certain that he is not prepared to visit the shed anytime soon.

The speaker is both curious and scared of the shed