Oh if anyone cares
The scoring breakdown is as follows:
1000 points per battle won
80 points per opposing Pokémon fainted
5 points per switch
1 point per super-effective attack
4 points per opposing attack that is rendered ineffective (either from type immunities, Levitate, or a status attack that the Pokémon is immune to due to typing)
2 points per opposing attack that is rendered not very effective
30 points if a battle was won with the opposing side taking at least one turn, 15 points if a battle was won without the opposing side taking a turn
-80 points per Pokémon fainted
-10 points per turn
-10 points per ineffective attack against the opponent (on the same basis as the above)
-2 points per resisted attack against the opponent
1 point per percent of HP remaining after each battle
You need 6001 or higher to get 7 stars.
So if you win all 5 battles and faint all 5*3=15 pokemon, that's 5000 + 1200 = 6200 points.
But you lose 10 points for every turn.
A minimum of three turns per battle is a given, so in total you lose 150 points without you being able to change that, puttingyou down to 6050.
If even one pokemon faints you're already below 6k.