Wordpress Development Conventions

I’ll only cover the important points, the rest can be found on https://make.wordpress.org/core/handbook/best-practices/coding-standards/

PHP Coding Standards

Naming Convention
// Optional SubNamespace
namespace Vendor\Package\SubNamespace;

class Class_Name {

   private $variable_name = ""
   const CONSTANT_NAME = ""

   public function function_name($some_variable){

   }
}

Plugin Folder Structure (with Composer)

/
    plugin-name.php
    composer.json
    src/ : Application specific code.
        ComponentName1/
        ComponentName2/
    vendors/
    vendors_dev/ : In-development packages.

    node_modules/
    node_modules_dev/ : In-development packages.