  Let $m,n$ be positive integers and $p$ a prime. We denote by $\nu(G)$ an
extension of the non-abelian tensor square $G \otimes G$ by $G \times G$. We
prove that if $G$ is a residually finite group satisfying some non-trivial
identity $f \equiv~1$ and for every $x,y \in G$ there exists a $p$-power
$q=q(x,y)$ such that $[x,y^{\varphi}]^q = 1$, then the derived subgroup
$\nu(G)'$ is locally finite (Theorem A). Moreover, we show that if $G$ is a
residually finite group in which for every $x,y \in G$ there exists a $p$-power
$q=q(x,y)$ dividing $p^m$ such that $[x,y^{\varphi}]^q$ is left $n$-Engel, then
the non-abelian tensor square $G \otimes G$ is locally virtually nilpotent
(Theorem B).
