Forget all talk about bad libraries, bad source voltages and wrong connections.
The problem is in the DHT11 itself.
I have about 10 samples of the sensor and I'm rather disappointed. Most of them differ about 10% of each other. Then there is also some bad apples with difference of about 20%. And the temperature can be wrong as well as the humidity.
As far as I know, there is no way to give calibration values to the sensor. Please tell me, if you have found.
The best way is to select the best sencor, calibrate it with known values. Use either the salt method or a good Waisala sensor.
When you have some 4-5 calibration points, build a polynome and use it to fix the values with the program.
The las bad apple I have gives 17%RH, 34C, when a good device tells me that there is 44%RH, 21C.
Another thing is that if you are using an ESP8266-01 with a DHT11 module, you will get errors due the geometry of the packet. The ESP8266-01 module gets rather warm in itself causing many degrees of error in temperature. I inserted a piece of cardboard between the plates and got much better values.