Let $N$ and $K$ be groups and let $G$ be an extension of $N$ by $K$. Given a property $\mathcal P$ of group compactifications, one can ask whether there exist compactifications $N^{\prime }$ and $K^{\prime }$ of $N$ and $K$ such that the universal $\mathcal P$-compactification of $G$ is canonically isomorphic to an extension of $N^{\prime }$ by $K^{\prime }$. We prove a theorem which gives necessary and sufficient conditions for this to occur for general properties $\mathcal P$ and then apply this result to the almost periodic and weakly almost periodic compactifications of $G$.