Disclaimer: I in no way, shape, or form support J.K Rowling, nor do I work on her behalf, I am merely contributing to a conversation from an unbiased stand point.
Tolkien's many works bring him to be viewed as the Father of Modern Fantasy, High Fantasy, and most correctly Epic Fantasy. Epic Fantasy is a subgenre of the Fantasy genre which follows a very specific format, they're often long stories that pit a Chosen One against a Dark Lord that contain numerous mcguffins and plot devices, a certain way to beat the big bad that's usually a hard task to complete, magic and non-human races, ect. All Epic Fantasies follow closely to this structure. As such, most stories written as Epic Fantasy will follow Tolkien's works and thus makes all Epic Fantasy stories inspired by Tolkien, whether indirect or not it doesn't matter, because at the end of the day, you are ultimately following Tolkien's writing style or story structure even if you're inspired by a different Epic Fantasy Author.
In shorter words, all Epic Fantasy stories are inspired by Tolkien's works because the man handcrafted the genre.
Considering how Harry Potter can be considered an Epic Fantasy as it fits nearly all the requirements to be deemed as such, it makes sense that you'd think it would be plagiarism on J.K.R's behalf. Because she wrote an Epic Fantasy, so it follows the same structure with similar plot devices as Tolkien's works. Because that's how the subgenre works.
You also have to keep in mind of what plagiarism is. Plagiarism is taking someone else's work and writing it off as your own. To call J.K.R's Harry Potter a plagiarism of Tolkien's works would be to ignore the differences between their stories and their characters and the world build up. It also blatantly ignores the definition of the word plagiarism.
To name a few differences;
> Tolkien's works take place in a completely made up fantasy world. Harry Potter takes place in a hidden magical world on Earth, centered around a school setting.
> Tolkien's protagonists have no direct connection to their antagonists besides being Destined or the Chosen One, such as Frodo who is the Chosen One because of his hobbit nature and how Sauron overlooked hobbits as a whole. Harry Potter's Protagonist is the Chosen One because the antagonist killed his family specifically, tried to kill him directly, but he survived.
> Tolkien's worlds contain absolutely no humans at all, there's hobbits and elves and other non-human races and mythical creatures, but no humans. Harry Potter has non-human races, such as veela and giants, but it also has humans, which are the main focus for the story.
> Tolkien's works are also Adult Fiction, following an adult character into one of the vast magical worlds to go up against that world's Big Bad. Harry Potter is a Young Adult Fiction story, following a young boy from the age of 11 into his late teens-early adulthood (and then following his children the same) as he fights and is harassed by his world's Big Bad while he grows and goes through childhood hardships (friendships, romances, puberty).
I'm sure there are other differences, but I said I was only naming a few.
There is definitely a sense of inspiration coming from Tolkien's works and their key differences make Harry Potter just that and only that, inspired by. Not Plagiarized. To call her works Plagiarism would dismiss every other Epic Fantasy within the subgenre as plagiarized. It could actually go so far as to dismiss every new (and old) work with a Chosen One, Dark Lord, Boon/Quest, Magical World, ect, as plagiarized as well. It also claims that she wrote one of Tolkien's works and called it her own, since combining a few key points of many of Tolkien's works into one story is actually what brought about the existence of the subgenre with Tolkien as the inspiration in the first place. That's how inspiration works.
So, from an objective standpoint, I believe this to be a hasty accusation based off of the very core of the entire Epic Fantasy subgenre that from which springs similarities between an author's works to the Father of Epic Fantasy's entire writing style and I highly suggest that everyone here re-evaluate their view of plagiarism before flying to Twitter with their findings and bringing about the end of an entire subgenre.