Yes, trade modules on starbases only affect planets, so you don't need trade modules on starbases if none of the planets in its area of effect is hosting a trade route.
The formula given in your link appears to have errors in the details. Trade route value is computed as
(A + B + C)*(1 + D)
A = ["income" fraction]*([host planet's production] + [destination planet's production])
B = min([max value from length], min(1, [length modifier]*[trade route length])
C = min([max value from age], min(1, [age modifier]*[trade route age])
D = [empire's trade bonus] + [starbase trade bonuses] + [planet's trade bonuses] + [trade route initiator bonus]
For standard and slave trade routes,
["income" fraction] = 0.05
[length modifier] = 0.025 per tile
[max value from length] = 250
[min value from length] = 1
[age modifier] = 0.1 per turn
[max value from age] = 250
[min value from age] = 1
For luxury trade routes,
["income" fraction] = 0.1
[length modifier] = 0.05 per tile
[max value from length] = 250
[min value from length] = 1
[age modifier] = 0.1 per turn
[max value from age] = 250
[min value from age] = 1
Luxury trade routes provide an additional +10% influence and +5% approval to the host colony, slave trade routes provide +5% production to the host colony, and any trade route either sponsored by or bound for an empire with the Entrepreneur ability also adds 1 morale to the host and destination colonies.