Context. The empirical relations between supermassive black holes and their host spheroids point towards the crucial role of galactic nuclei in affecting the properties of their hosts. A detailed understanding of how the activity of a galactic nucleus regulates the growth of its host is still missing. Aims. To understand the activity and the types of accretion of supermassive black holes in different hosts, it is essential to study the radio-optical properties of a large sample of extragalactic sources. In particular, we aim to study the radio spectral index trends across the optical emission line diagnostic diagrams to search for potential (anti)correlations. Methods. To this goal, we combined flux densities from the radio FIRST survey at 1.4 GHz (with the flux density range 10 mJy ≤ F 1.4 ≤ 100 mJy) for 396 SDSS sources at intermediate redshift (0.04 ≤ z ≤ 0.4) with the Effelsberg radiotelescope measurements at 4.85 GHz and 10.45 GHz. The information about the optical emission-line ratios is obtained from the SDSS-DR7 catalogue. Results. Using the Effelsberg data, we were able to infer the two-point radio spectral index distributions for star-forming galaxies, composite galaxies (with a combined contribution to the line emission from the star formation and AGN activity), Seyferts, and low ionization narrow emission region (LINER) galaxies. Conclusions. While studying the distribution of steep, flat, and inverted sources across optical diagnostic diagrams, we found three distinct classes of radio emitters for our sample: (i) sources with a steep radio index, high ionization ratio, and high radio loudness, (ii) sources with a flat radio index, lower ionization ratio, and intermediate radio loudness, (iii) sources with an inverted radio index, low ionization ratio, and low radio loudness. The classes (i), (ii), and (iii) cluster mainly along the transition from Seyfert to LINER sources in the optical diagnostic (Baldwin, Phillips & Telervich; BPT) diagram. We interpret these groups as a result of the recurrent nuclear-jet activity.A&A proofs: manuscript no. zajacek_index different sections of the diagnostic diagrams have been traced back to systematic changes in the ionization parameter, the shape of the ionizing continuum, the fraction of matter-bound clouds, and/or the role of metal abundances.According to a given set of ratios, four spectral classes of galaxies are commonly distinguished. In star-forming galaxies (SF), the ionizing flux is provided mostly by hot, massive, young stars and associated supernovae that are surrounded by HII regions. They have lower [OIII]/Hβ and [NII]/Hα ratios than pure AGN sources (see also Figs. 1 and 2). In between SF and AGN sources are composite (COMP) galaxies, with a mixed contribution from star formation (HII regions) and AGN. The AGN spectral class was further subdivided into Seyfert 2 sources (Sy) and low-ionization nuclear emission regions (LINERs). LINERs are characterized by a lower [OIII]/Hβ ratio in comparison with Seyfert 2 AGN sources and a higher [NII]/Hα ratio wi...