Is boiler connected up right
No -- there is a "dip tube" attached to the inlet of the heater so the cold water coming in goes to the bottom and then up the heater as it is heated, with the hot port taking its output from the top of the heater.  When the plumber swaps the two, the cold water winds up having to sink down the heater on its own and the hot water is now being drawn from the bottom, which is what causes the lukewarm water you were seeing.

Call a more competent plumber and have them get the tank hooked up correctly.