It all depends. Its calculated using downloads and theres a lot of calculations done but I do not know the exacts of it. Generally speaking
More downloads = More diamonds
More plugins = More downloads
It accumulates over time since it gives you more diamonds each day