Kariyanna B. I prefer a distinction between the aspects such as composition, taste, colour etc which can be observed directly by the consumer and group them as quality and those only to be detected by laboratory methods like micro-organisms, pesticides, heavy metals, mycotoxins, drug residues etc and group those as safety related.
If any of those items exceed the legal limits, than the quality of the product does not comply with the standards set.
This is my personal opinion, not necessarily shared by others.
The attached paper on quality and safety of table eggs is an example of my opinion.
Kariyanna B. This is not a simple question to answer, as it will depend on area of the world, local legislation and whether or not this legislation is strictly maintained by the authorities and whether any breaches of the legislation are given wide publicity or not.
Food safety is a perception issue by consumers rather than a science based approach. A nice example was the "Fipronil in eggs" issue in my country some years ago. This was caused by illegal use and thus the legal tolerance was quite low, so massive amounts of samples exceeded the legal tolerances and were destroyed. It caused quite some attention in all media. These "poison eggs" were at that moment a real quality issue, although the real acute threat for humans, was probably quite low.
In my opinion a real threat for humans in the longer term are most likely halogenated hydrocarbons, being widespread in the environment and quite persistent. You can read amore about these topics in the attached bookchapter.
Quality of a food depend on may parameters including physical properties, nutritional properties, toxicological quality, microbial and storage stability and sensory quality. As you have mentioned, the availability of/ content of heavy metals due to the application of pesticides and weedicides can also be considered as a quality parameter of farm crops. But apart from that, physical properties of the products (such as maturity level, colour, texture, availability of insect/pest damages), nutritional properties (particularly the micro nutrient content of most plant based food products changes due to soil condition, plant variety, maturity level etc.), microbial stability (because certain crops themselves can be contaminated with pathogenic microorganisms) and sensory parameters can also taken into consideration in evaluating the quality of farm crops.
Pest destroy the quality of the crop. Maize with a lot of weevils is not good as the nutrients have been consumed by the weevils and will be of no value to humans.
The quality of food products, in conformity with consumer requirements, is determined by sensory attributes, chemical composition, physical properties, the level of microbiological and toxicological contaminants, and shelf life, and by packaging and labeling.
These determinants include dietary components (e.g. highly palatable foods and alcohol), but also diverse cultural and social pressures, cognitive-affective factors (perceived stress, health attitude, anxiety and depression), and familial, genetic and epigenetic influences on personality characteristics.