Ok,
Re-reading the firearms legislation / guidance:
Prohibited Weapons Defined by section 5 Firearms Act 1968 as Amended
It is an offence under section 5 to possess, purchase, acquire, manufacture, sell or transfer (without the authority of the Secretary of State) the weapons listed below. The weapons below are subject to the mandatory minimum sentence
Section 5(1)(a) any firearm which is so designed or adapted so that two or more missiles can be successively discharged without repeated pressure on the trigger, e.g. machine guns, burst fire weapons;
…. Loads of other weapons listed
….
Section 5(1A)(a) any firearm which is disguised as another object, e.g. pen guns, key fob guns and phone guns.
Note the disguised as another object.
In addition the following are also prohibited but are not subject to mandatory minimum sentences:
Section 5(1)(b) any weapon of whatever description designed or adapted for the discharge of any noxious liquid gas or other thing. Generally stun guns or electric shock devices, CS gas not usually cattle prods but depends on type.
So a plain old stun gun, that looks like a stun gun may not be subject to a minimum sentence, unless:
Note: Parliament has provided that disguised weapons fall within the provisions for a minimum sentence and so, an offence contrary to section 5(1A) should be charged rather than an offence contrary to section 5(1)(b) where a stun gun is disguised as another object and also meets the requirements of section 5(A1), (R v Brereton [2012]EWCA Crim 85) ;
I.e. a stun gun made to look like a mobile phone.
And the mandatory minimum sentence part:
Mandatory Minimum Sentence:
The mandatory minimum sentence is 5 years’ imprisonment for an offender aged 21 or over and 5 years’ detention in a young offender institute for those aged 18, 19 and 20 at the date of conviction. Offences that attract the minimum sentence are triable only on indictment (Section 288 Criminal Justice Act 2003, which also amends Schedule 6 to the Firearms Act 1968).
There is also guidance of exemptions from the minimum sentences on exceptional circumstances.
So, it looks like in the case of the OP, it may be the case that the stun gun device possessed was clearly marked as such … hence the less than minimum punishment.