I think it’s the culture. The code quality of almost every PHP project I’ve seen is atrocious. I’m not saying every JS project is perfect (far from it), but amazingly well-written JS projects are ubiquitous.
So when I ask myself “how much do I trust complete strangers on the internet?” the answer is “not much, but even less than that if it’s written in PHP.”
Instead of pure code try seeing it as a book. If I read a book with a lot of spelling/grammar errors, a story that goes nowhere, characters that aren't interesting to me, plots that make no sense, etc..., then I'd tend to think of it as a not well written. Same with code, if variable names are obscure, function names don't match what they actually do, needless abstractions, nonexistent documentation, no tests, etc..., then I'd tend to think of it as a not well written project. Those aren't the only things I look for, but that's a start for me.
One could also argue, "why does it matter how it's written, it's not a book and it does what I need to do so that's fine." If it works and you don't have to do anything, great. If you have to troubleshoot it because it broke, then hopefully the code is structured in a way that lends itself to debugging. Otherwise, you might end up having a bad time.
For myself I'd say the lodash repo is well written. Would you agree/disagree?
My impression from when I read a big chunk of the React codebase to confirm some suspicions about how they'd implemented hooks ("wait, if that's how these behave, does that mean they... no, surely they didn't... well, yep, that's exactly what they did") was that it had more layers of abstraction than would be ideal and was a bit under-commented, but not awful.
So when I ask myself “how much do I trust complete strangers on the internet?” the answer is “not much, but even less than that if it’s written in PHP.”