A lot of the advanced stats measuring defense are still viewed with skepticism even by analytics devotees. Some of them (such as basketball references' DBPM) are based on counting stats (blocks, steals, rebounds) and this obviously paints an incomplete picture of what defense is. More interesting are the measures of opponent shooting percentage when player tracking technology identifies the player in question as the closest defender but even there you're missing the important contextual information about whether they were rotating off of another defensive assignment or navigating a pick. I suspect that the most useful quantitative data on defense is proprietary at this point so unless you're in an NBA front office or have the spare time to tabulate your own database, that is information we don't have access to as sports fans.
As a kind of short-hand and lacking an easy to use alternative, my go to move for measuring relative defense impact has been to look at the advanced stats page on basketball-reference and sort the players on the team by DRTG. My reasoning here is that within the context of the team, DRTG is telling you which players are generating more statistically measurable defensive possessions. There are some enormous caveats to this approach: the stat is skewed in favor of frontcourt players and becomes more useful the longer a player is on the floor. So you have to immediately throw out bench bigs who play limited minutes because they're invariably going to end up at the top of the list unless they're truly awful. You also have to throw out players who only get minutes in garbage time as those stats aren't really reflective of competitive basketball. And lastly, trying to compare DRTG numbers of players on different teams is asking for trouble as pace and scheme are going to skew the results differently so you're usually comparing apples and oranges.
So when you do all that, Barnes was indeed worst on the team this past season. This was a weird season with some sample size issues so I also looked at the previous season and he was also tied for last on the team the season before. Is that telling us anything useful? Like you I feel like Barnes passes the eye test as a competent defender. He doesn't make plays that generate turnovers very often but he's rotating where's he's supposed to be and moving his feet. I wouldn't expect him to measure out as the worst defender on the team, but the stats told the same story about his career before he got to Sacramento. On paper he's a player who is at best neutral and skews toward negative value on defense. To fully understand why I think you would need to study the player movement data to see how he's reacting relative to the other 9 players on the court.
My own opinion about "good" defense in the NBA is that it's not about scheme (though you can use that to hide a poor defender) and it's not about effort and athleticism (though they do help raise the baseline). Both are common go-tos for analysts but without getting into a long explanation of why, I instead think defense primarily comes down to individual players and how well they understand what the offense is doing and how quickly they react to changes. Some players are exceptionally gifted athletically but they put little or no effort into studying their opponents so their physical gifts are wasted on defense. Other players are intelligent enough to understand the nuts and bolts of opposing offenses but find themselves a step or two behind the play when they try to process it in real-time on the court. I've put a great deal of effort into analyzing players for defensive aptitude (mostly unsuccessfully) but the one thing I'm convinced of is that defense is a skill all on it's own and just like you can't teach a player to dunk like Kobe Bryant or see the floor like Steve Nash I don't think you can coach up everyone to make them good defenders in the NBA. The willingness must be there but there also needs to be a heightened level of situational awareness which is something you either have or you don't. Barnes to me is in the category of players who understand the assignments but react too slowly to generate stops consistently. I think his effort level and commitment are above average but the results are not and that's not really his fault but as a GM you're interested in results. One of the biggest ways the team could improve it's overall defensive performance is to bring in a couple of wing players who can cover multiple positions and consistently generate positive results on that end of the floor. And that probably means moving on from Barnes.