Codimension, multiplicity and integral extensions