Guideline in library creation
Where to put additional libraries (such as &lt;Wifi.h&gt;) in .h or .cpp, since it works when defined in each one of them?
  


Any library can reference any other library. So including another library in your library is the same as including in the sketch. They should be on standard locations.

Include the other libraries .h in the file where you need it. If you use something from the other library in your .h, include it there. If you need it only in .cpp include it there.


  
  What is the purpose of defining variables in the :private section? Since they can be defined inside constructor, and as far as I know/tested, it works as well.
  


With declaring a class member as private, the author of the class tells: don't use it, it is for internal use and can change in future versions.


  
  In a .cpp file, does it matter when instances or variables are defined outside a class (at the beginning of code ), since again, it works the same?
  


If the variable is not a member of the class, then if you create two instances of the class they will share the variable. A variable in constructor is restricted to the constructor's scope.