To expand the comment of @potentially dense: the answer is $r-2$, and it does not depend on the degree of $X$. In general, suppose $X\subset \mathbb{P}^r$ is a hypersurface, and $p$ a smooth point of $X$. Lines passing through $p$ and contained in $T_p(X)$ are parametrized by a $\mathbb{P}^{r-2}$; since $T_p(X)\not\subset X$, we see that lines passing through $p$ and contained in $X$ form a family of dimension at most $r-3$. Now if (and only if) $p$ is a Eckart point, i.e. $X\cap T_p(X)$ is a cone, the dimension is exactly $r-3$. And it is easy to construct a smooth hypersurface with such a point, for instance $X$ given by $X_0^{d-1}X_1+X_1^{d}+\ldots+ X_r^d=0$, with $p=(1,0,\ldots ,0)$.