A med student can absolutely contribute useful work, especially with good supervision. The issue is more that inexperienced authors plus publication pressure plus easy tooling is a bad combination
Feels like the minimum standard should be sharing the exact query/design choices and being very explicit about what biases the analysis can and cannot address