Okay, this is what you see at the entrance. Would you think that this is a popular restaurant? They wash the dishes by the street. Every customer must walk past this food police nightmare to get to the dining area.
This is what you see when you walk through the kitchen. Yes, this is what you see inside. What you may have thought was a total dive turns out to be something really nice.
And you can see the food is not too bad. A seaweed soup, oysters on a sizzling plate, wontons, etc.
When you come to Thailand, or Cambodia or Vietnam, you must Un-Americanize your head. If you go through any part of this section of the globe, things are done differently. Much of the rule is to go to a place that is relatively popular, but not toooooo popular and busy. Quality might go downhill. Don't go to a place that is dead. There might be a problem there since no one wants to risk it. Restaurants are rated by popularity, not by A-F grades, or Yelp, or anything else like Chowhound.
Locals know where the beef is. Just go with locals if you can.
Remember this rule: What you see isn't what you might get.