There are other differences too.
Plumage:
Males and female dunnocks are very similar to each other and do not have the dark browns/blacks (or white) of the male sparrow. The dunnocks also have a slightly more gingery brown than sparrows with more smaller speckling.
Habit:
Dunnocks never visit the hanging feeders (at least in our garden with peanuts, mixed seed and fatball holders, I have never seen them attempt to feed from them). They are ground feeding birds more in competition with the robins and wait underneath for the crumbs to fall.
When danger threatens, sparrows fly away, dunnocks dash under the nearest hedge or shrubbery.
Sparrows flock and will often visit in large numbers - I have had up to 40 at a time. Dunnocks arrive in ones and twos but since they are notoriously unfaithful, a mistress or toyboy may show up as well. I have only seen a max of 4 at a time in our garden.