In every sentencing, the judge will consider mitigating factors and aggravating factors before passing judgment. Mitigating factors are any circumstance that indicate a reduced sentence is fair. A guilty plea is one example, as it saves the court time and resources it would otherwise have spent on a trial.
Aggravating factors are any circumstances that could lead to an increased sentence because they increase the severity of the offence. This could include the use of a weapon during the crime or offences motivated by bias based on race, sex, religion, age, sexual orientation or gender identity.