Spike-timing-dependent plasticity (STDP) is one of the important rules for the change of synaptic weights between neurons in biological nervous systems. In this paper, we study the effect of STDP on the synchronization phenomenon induced by time delay in the neuronal network which is the scale-free network with small-world property, and nodes of the network are constructed by Izhikevich neuron and connected by chemical synapses. For appropriate time delay values, there exists an optimal range of STDP maximum weight value in which the synchronization of the network is better, and in addition the synchronization is decreased with the increasing of STDP maximum weight value. The network with high synchronization has a centralized distribution of synaptic weights within it, while conversely, an unsynchronized network has a more discrete distribution of synaptic weights. When the STDP maximum weight value is too small, the collective firing pattern of network is not affected by synaptic current, and the synchronization of the network is also not affected. Interestingly, comparing with the small-world network and the scale-free network, it is found that a network has a smaller range of optimal STDP maximum weight values when the network is of larger average clustering coefficient, shorter average shortest path length, and higher small-world property. Our results can illuminate the potential significance of STDP for information processing and transmission in the nervous system.