It may be worth remarking that since ${\rm gcd}(p-1,\frac{p^{2}+1}{2}) = 1,$ every group of order $\frac{p(p^{2}+1)}{2}$ has a normal subgroup of index $p$ by Burnside's normal $p$-complement theorem. On the other hand, no positive divisor of the odd integer $\frac{p^{2}+1}{2}$ (other than 1) can be congruent to 1 (mod $p$). Hence it is the case that any group of order $\frac{p(p^{2}+1)}{2}$ has a unique Sylow $p$-subgroup, so is a direct product of a group of order $p$ and a group of order $\frac{p{^2}+1}{2}.$ Whether or not the resulting group is Abelian depends only on the structure of the latter group of order $\frac{p^{2}+1}{2},$ which most answers to date have concentrated on anyway. However, it is factthe case that any such group (of order $\frac{p(p^{2}+1)}{2}$ ) decomposes as a direct product of two smaller non-trivial groups. I don't know if there is a characterization of integers $n$ such that every finite group of order $n$ is decomposable.