My son was getting 7/8/9s in his tests 1st & 2nd class. Had a brand new teacher in 3rd class and he had gotten moved to a class with a lot of additional needs where the teacher spent more time breaking up fights than teaching (to be fair, she was new and should never have been given that class, she definitely needed more experience to cope with it) He dropped to 3 in maths, and 5/6 in others. The school never rang or discussed the results, only just put it on a report with a note "progressing well" !
He moved schools and is in 5th class now and back to 7/8/9s so definitely some results can be a product of the environment.