Holiness does not make the priest, nor does wickedness unmake him: for contrariorum eadem est ratio. By 'administration' here is meant 'valid administration,' not 'licit.' It is a mortal sin to administer a Sacrament, being oneself in mortal sin. But that is the affair of the minister, not of the recipient.
Of God and His Creatures: 4.77