I have been looking from a different angle, as John McDonald born 1852 does seem to be illegitimate.
I was looking for any Ann Fimister in 1851 census who might be a possible mother.
I can see a 13 year old girl, and a 50 year old house servant.
I wonder if the girl Ann (born 11 Nov 1837) is possible, as she would have been 15- 16 when John was born.
Ann FIMISTER is the daughter of Isabella FIMISTER (age 40) widowed shopkeeper of Young Street Inverness. I am not sure that this Anne ever married - in 1881 census she is still living in Young St with her mother and sisters, working as a dressmaker. She is not with her mother in the 1861 or 1871 census.
https://www.findagrave.com/memorial/181180438/anne-femisterI also wonder about a May FEMISTER who is age 36 and a seamster living in Davies Square, Inverness. She is with her 76 yr old mother (pauper), and a child who appears to be May’s illegitimate child - Robert THOM age 5. This May Femister does not seem to marry either, and is found on later census living with her son Robert THOM.
https://www.findagrave.com/memorial/181185841/may-phemister