I think that you are talking about what are sometimes called "rates of evolution", see also https://www.thenakedscientists.com/articles/questions/do-smaller-organisms-evolve-faster. That wiki is a collection of info of interest mostly to specialists, but the blog post may be helpful.
The short answer is that there is a strong negative correlation between mass of an individual organism and rate of evolution, in terms of years or whatever. But there is not necessarily a causal relationship there.
People can argue that there is such a causal relationship, because the life cycles of small organisms are shorter, and more generations means more mutations, which means more evolution is possible. In the classic example, E. coli reproduces every 30 minutes under good conditions, whereas humans reproduce every 30 years. This is sometimes true but not always.
Alternately, there are bacteria such as Micrococcus that are smaller than E. coli but divide more slowly, and by this same logic must therefore be evolving more slowly than the larger bacteria. So there's a lot of variation.
As another counterexample, bacterial cells can form spores that undergo stasis for tens of thousands of years, then wake up under better conditions and go about their life. During that time, elephants are evolving much faster than the bacterial spores- even though outside of that time the bacteria are dramatically faster.
Another confounding issue is that the different groups you name are of dramatically different ages. Bacteria are probably ~4 billion years old, and have had tons of time to diversify. Even if they had the same evolutionary rate as elephants, you would still expect more species in bacteria than you would in flowering plants, which are ~200 million years old. So measuring evolutionary rate in terms of "number of species" is quite misleading.
Yet another issue is that evolution may not happen at a constant rate. This is a normal assumption people make because it makes life simpler, but there is a certain amount of data that suggests that a lot of large evolutionary changes happen very quickly, and then there are periods of relative stasis; this is sometimes called "punctuated equilibrium" or "saltation". An example of this is the so-called Cambrian Explosion. So even though one group A may have gone through 1/2 the generations of group B in a unit of time, it may have gone through 10X the "evolution" in terms of changes to body shape/other characters.
So, it's complicated, and there's a large field of research in evolutionary biology that is trying to answer these kinds of questions. Your assumption is broadly correct in terms of agreement with the data, but it's not clear that smallness per se is what makes evolution happen more quickly.