Galindo et al. introduced a class of codes which are obtained by evaluation of polynomials at the roots of a trace map (Galindo et al. in IEEE Trans Inform Theory 65: 2593–2602, 2019). Via subfield subcodes, this construction yields new linear codes with good parameters as well as good resulting quantum codes. Here, we extend this construction to allow evaluation at the roots of any polynomial which splits in the field of evaluation. Our proof relies on Galois-closedness of codes in consideration. Moreover, we introduce a lengthening process that preserves Galois-closed property of restricted evaluation codes. Subfield subcodes of such lengthened codes yield further good linear codes. In total, we obtain 17 linear codes over F4 and F5 which improve the best known linear code parameters in Grassl (Bounds on the minimum distance of linear codes and quantum codes, 2022, http://www.codetables.de). Moreover, we give a construction for two linear codes which have the best known parameters according to Grassl (Bounds on the minimum distance of linear codes and quantum codes, 2022, http://www.codetables.de), but for which no construction was known before.