My theory is that the yellow rectangle is where you start, and touching the blue zone is necessary to open the blue door to escape.
With that in mind, this is my optimized path I came up with, coming in at a lean 44 squares traveled >:)