5. e5 is a french defense advance variation where black would rather have a tempo for a move other than a6, so that would have to be a fine choice.
Playing against the O'Kelly variation of the Sicilian Defense
5. e5 is a french defense advance variation where black would rather have a tempo for a move other than a6, so that would have to be a fine choice.
I thought about that, but since I have never played the advance French I decided I should avoid it. I should have mentioned that in the annotations.

e5 would have been very helpful and as others said, you'd have transposed to the advance variation of the french defense.

7.Qb3 has to be wrong, that's just accepting you've got a worse position. Your d4 pawn isnt actually under threat yet there anyway as there would be a typical Bb5+ motif at the end of the sequence winning his queen. Simply taking on d5 and Re1+ looks rather inconvenient for him; his queen is somewhat misplaced.

7.Qb3 has to be wrong, that's just accepting you've got a worse position. Your d4 pawn isnt actually under threat yet there anyway as there would be a typical Bb5+ motif at the end of the sequence winning his queen. Simply taking on d5 and Re1+ looks rather inconvenient for him; his queen is somewhat misplaced.
You beat me to the punch

The advance french after 5e5 is quite ok for black, who can play Bd7-b5 making use of a6,
I was under the impression that black was a lot worse in this line:
7.Qb3 has to be wrong, that's just accepting you've got a worse position. Your d4 pawn isnt actually under threat yet there anyway as there would be a typical Bb5+ motif at the end of the sequence winning his queen. Simply taking on d5 and Re1+ looks rather inconvenient for him; his queen is somewhat misplaced.
I didn't see the Bb5+ line. My chess vision is poor.

The advance french after 5e5 is quite ok for black, who can play Bd7-b5 making use of a6,
I was under the impression that black was a lot worse in this line:"
IM Pfren mentioned this line in a "review " of a book mostly about the Rubinstein french sometime back. It might not be so terrible for black, at least black's play as some point preventing white from castling. All the same would be interested to know if the more recent second edition of that book stuck with this line.
What exactly is wrong with 3.d4?
I mean, its the third move of the game.
This is what happened when I played 3. d4:

@IMBacon 3. d4 is accepted by modern theory to be not optimal.
3. c3 is usually recommended if one wishes to 'punish' black, since Black finds little use out of a6 in the Alapin pawn structure. However, if you don't play the Alapin, I believe 3. Nc3 forcing black to transpose to a more orthodox line is the most practical decision.

Why would you purposefully play something not optimal when there are clearly better alternatives? The O'Kelly is a one trick pony --- avoid their 'trick' and don't play 3. d4, and you will be a happy camper.

Why would you purposefully play something not optimal when there are clearly better alternatives? The O'Kelly is a one trick pony --- avoid their 'trick' and don't play 3. d4, and you will be a happy camper.
You may not believe it, but there are people out there who want to play a Sicilian but are not too keen on learnig theory heavy lines like the Najdorf for example. And the O'Kelly is playable even if white avoids.

I didn't see the Bb5+ line. My chess vision is poor.
Don't beat yourself up over it. It is something you have to develop. I see it now. But there was a time when i didn't.
I played the opening poorly against a player rated more than 200 points above me. I would like to know how I should have played the opening better, and whether I could have done anything to improve my position in the middlegame before I made a blunder.