ESP12E motorshield analogWrite issue when powering DC motor
This answer is the summary of the comments of the question. The idea of the solution was originally mentioned by @Majenko.

You powered the shield with about 6 Volts. The statement analogWrite(PWMA, 5); gives you (5/1024) ~ 0.5% of this 6 Volts at the output pin PWMA. This 0.03V are not enough to drive the motor. 

You should use at least 3 Volts to drive the motor (as of the specs). 
This can be achieved by using a duty cycle of the PWM signal of about 50%.  analogWrite(PWMA, 512); should do the trick.