The lag spikes get worse the longer you play, you have some kind of memory leak.
The 'glitch' effect makes lag spikes 10x worse while they're on screen - however you've implemented that effect is bad, kills the browser.
Lots of times you cannot attack things and no reason is given. By trial and error it seems each ship has a min damage it will accept, and if you have less than that attack, the UI just ingores your mouse clicks?