West Ham climbed out of the Premier League relegation zone with a 4-0 win against Wolves that dumped Tottenham into the bottom three.