Plants that assist each other to grow well, repel insects or even other plants when grown next to each other is called companion planting and can be a sustainable and eco-friendly way to improve and protect your garden against unwanted pests and disease.
Chromatography has been used to explain why some plants like or dislike being planted with other plants. It is possible to make a specific chromatographic test to find out why, or if at all, a plant is helping or hindering its neighbors. Chromatography has also been used to prove that plants do significantly better with compost than without.
Certain plants added to a compost pile can assist it to break down quicker or add nutrients to it. Dandelion is high in iron and absorbs two to three times as much of this mineral as any other herb/weed.
Nettles are also high in iron and will help start or speed up the fermentation process of a compost pile. Like comfrey, nettles have a carbon-nitrogen ratio similar to manure.
Salad burnett is rich in magnesium, sheep sorrel is high in phosphorus, chicory, goosegrass and bulbous buttercup are high in potassium. Horsetail, ribwort and bush vetch store cobalt and thistles have trace elements of copper.
So if you know your soil is lacking in some of these nutrients, make a conscious effort to add these plants to your compost pile where they will help.