Yes, the algorythm could be improved for sure. Anyway the green arrows in your image present paths that branch too and the player must navigate these too in order to find the exit. He has no clear vision of the end when, for example, this maze is used in a fps game.
Anyway, thanks for your suggestion, really appreciated!