noiasca:
Agree. don't mess around with AT-commands. If you need more GPIO's use something like the more userfriendly Wemos or NodeMCU.
+1
Even if you really have to use an Arduino, use it as a slave. The ESP8266 is a much, much more powerful microcontroller than the Arduino UNO.
Also, you aren't running SoftwareSerial on pins 0 and 1, are you?