  For every $p$-group of order $p^n$ with the derived subgroup of order $p^m$,
Rocco in \cite{roc} has shown that the order of tensor square of $G$ is at most
$p^{n(n-m)}$. In the present paper not only we improve his bound for
non-abelian $p$-groups but also we describe the structure of all non-abelian
$p$-groups when the bound is attained for a special case. Moreover, our results
give as well an upper bound for the order of $\pi_3(SK(G, 1))$.
