Let ρ(G) be the spectral radius of a graph G with m edges. Let S k m−k+1 be the graph obtained from K 1,m−k by adding k disjoint edges within its independent set. Nosal's theorem states that if ρ(G) > √ m, then G contains a triangle. Zhai and Shu showed that any non-bipartite graph G with m ≥ 26 and ρDiscrete Math. 345 (2022) 112630]. Wang proved that if ρ(G) ≥ √ m − 1 for a graph G with size m ≥ 27, then G contains a quadrilateral unless G is one of four exceptional graphs [Z.W. Wang, Discrete Math. 345 (2022) 112973]. In this paper, we show that any non-bipartite graph G with size m ≥ 51 and ρ(G) ≥ ρ(S 2 m−1 ) > √ m − 2 contains a quadrilateral unless G is one of three exceptional graphs. Moreover, we show that if ρ(G) ≥ ρ(S − m+4 2 ,2 ) for a graph G with even size m ≥ 74, then G contains a C + 5 unless G ∼ = S − m+4 2 ,2 , where C + t denotes the graph obtained from C t and C 3 by identifying an edge, S n,k denotes the graph obtained by joining each vertex of K k to n − k isolated vertices and S − n,k denotes the graph obtained by deleting an edge incident to a vertex of degree two, respectively.