Hi there.
this is only a personal opinion.
La Linea is not pleasant...Gibraltar is not so pleasant either. If I were you I wouldn't bother spending the night..Yes the rock is impressive and it is interesting to visit, no doubt about it, the views are amazing. I would arrive early and leave after a few hours, I have done this and it was sufficient. Sorry to be so blunt about the place but that is what I think.
best of luck with your trip.
JamesC