The following screenshot shows you the structure of this plugin.

Sukellos Fw installation

The Sukellos Basic plugin is located under a directory named wp-sukellos-basic-plugin.

Its main file is therefore logically named wp-sukellos-basic-plugin.php, containing our first class, called WP_Sukellos_Basic_Plugin_Loader, whose responsibility is the loading of the plugin and its administration:

  • WP_Sukellos_Basic_Plugin, which is the plugin class, located in class-wp-sukellos-basic-plugin.php
  • WP_Sukellos_Basic_Plugin_Admin, which is the admin plugin class, located in class-wp-sukellos-basic-plugin-admin.php

Now have a look at the class diagram:

Sukellos Fw installation

In this class diagram, you can see that each of our class extends another parent class located in Sukellos Fw. This trick is enabled by inheritance in object-oriented programming. This allows us to group all the reusable logic in the parent class, and thus only have to worry about the specific processing that interests us.