Secondary metabolites are chemicals produced by plants that are not essential for primary functions like growth, photosynthesis or reproduction. They include a wide variety of compounds classified by chemical structure or pathway. Many secondary metabolites help defend plants from herbivores and pathogens. Some have uses as medicines, flavors or recreational drugs and influence plant interactions with other organisms.