That's because you're telling it to loop multiple times. The outer Channel Entries tag is a loop so it will loop through all results defined by the filtering criteria. Then You're calling in your plugin and passing in the Playa Child ID's tag which also produces a full loop to provide a single parameter to your plugin. Anything with tag pairs will loop. You're also passing in dynamic variables as attribute values so all in all that will produce quite a lot of queries to even return a small number of entries.
Using Stash will help to cut this down but obviously the loop(s) would still need to run at least once to have the value available to pass on to your plugin. So in that case you'reyou'll probably need to set some nested Stash results to run the Channel Entries tag and the Playa Child IDs tag. Then Stash those results and call your plugin later on (outside of that loop). The first time it's run it may well result in the same number of queries but after that you should see a noticeable reduction.