If someone forced me to come up with some sort of value metric I would, as a biased human, come up with something like this.

(25%) Contribution to the biosphere (-10 to 10) +
(25%) Sentience (0 to 10) [Species sentience regardless of pleasure and pain (0 to 10) + Species sentience including pleasure and pain (0 to 10)] divided by 2 +
(50%) Brain (0 to 20) (Brain to body mass ratio + Brain mass) divided by 2

So a comparison between humans and worms would run something like this:

(25%) Species' contribution to the biosphere

Humans -10
Worms 10

(25%) [Species sentience regardless of pleasure and pain (Humans 10 Worms 1) + Species sentience including pleasure and pain (Humans 10 Worms 1)] divided by 2

Humans (10 + 10) : 2 = 10
Worms (1 + 1) : 2 = 1

(50%) (Brain to body mass ratio + Brain mass) divided by 2 (0 to 20)

Humans 20

Worms 0

Final score

Humans 20 + 10 - 10 = 20

Worms 0 + 1 + 10 = 11

Notice that if you were extremely biased in favor of humans, giving this last factor a value of 90% and only 5% to sentience and contribution to the biosphere respectively, it would make worms less valuable in comparison. Still, it wouldn't take too many species to cumulatively score higher than humans. The score would go something like this

(5%) Species' contribution to the biosphere

Humans -10
Worms 10

(5%) Species sentience regardless of pleasure and pain (Humans 10 Worms 1) + Species sentience including pleasure and pain (Humans 10 Worms 1) divided by 2

Humans (10 + 10) : 2 = 10
Worms (1 + 1) : 2 = 1

(90%) (Brain to body mass ratio + Brain mass) divided by 2 (0 to 180)

Humans 180

Worms 0

Final score

Humans 180 + 10 - 10 = 180

Worms 0 + 1 + 10 = 11