This research I was involved in may help answer your question. The project outlined below used algae, which is sort of a plant, in a bioreactor. The research was concerned with producing oxygen, not food. The design objective was to recycle one person's CO2 into O2, with the C being converted back into carbohydrates and other biomolecules.
The study used Chlorella vulgaris algae for generating medical oxygen using solar energy in off-grid medical facilities.
Bottom line: it requires one cubic meter (one metric ton) of nutrient medium per person. The mass of the algae itself is trivial compared with the growth medium.
Light is toxic to the photosynthetic enzymes in algae. Sunlight needs to either be attenuated or intermittent. Light intensity decreases as it passes through the medium. If you are attempting to minimize the mass of the medium, you will need to use LED light source (and the attendant solar panels) rather than direct sunlight.
The algae themselves attenuate light so either algae density needs to be low (lots of medium) or LEDs must be close together (lots of LEDs).
Algae are not very efficient at converting light to O2. That’s not what evolution selected them for. Overall, they are 12% energy efficient at separating CO2 into O2 and carbohydrates. The bioreactor process is power intensive, so it becomes a major power load on a spacecraft or on a Mars-based installation.
The bioreactor needs to be mixed, but very gently since the algae are fragile. On Earth this is usually done with bubbles rising through the medium, but the bubble size needs to be controlled to prevent shear forces on the algae. In microgravity, bubble mixing is not available. Mixing the cubic meter of medium in small passages is a non-trivial problem. On Mars, bubbles would work fine. Not so on a space vehicle.
Separating O2 bubbles from the medium is easy if gravity is present as it is on Mars. Once again, not on a space vehicle.
High O2 productivity is dependent on keeping the algae on a particular point of their growth curve by regulating density, light intensity and nutrient levels. The bioreactor will need attention, maintenance and problem solving. The Martian astronaut becomes a farmer.
The bioreactor produces a large amount of green goo and consumes significant amounts of electrolyte nutrients. In theory a closed loop could be engineered where Mars astronauts could poop in the bioreactor and eat the goo. You might want to run that past them first.
Mass of algae and medium: 1 metric ton per person
Size of container: 1 cubic meter (within Mars colony's temperature
controlled pressure hull).
Mass of containment, solar panels, lights, pressure hull volume and
control systems: 1 metric ton per person
So (in very round numbers) you are looking at 2 metric tons per person for the bioreactor.
According to NASA each person aboard the ISS consumes 0.84 kg O2 per day. 2 tons of O2 per person would last 6.5 years at that rate. From a mass budget perspective it makes more sense to use O2 boil-off from propellant tanks than to carry a bioreactor for interplanetary voyages or Mars colonies. Boil-off would also be much more reliable.
So bioreactors don't make sense for producing O2 on Mars. Maybe they do make sense for making edible green goo.