{"id":15515231,"url":"https://github.com/szepeviktor/starter-plugin","last_synced_at":"2025-10-05T00:48:30.941Z","repository":{"id":37875736,"uuid":"272199465","full_name":"szepeviktor/starter-plugin","owner":"szepeviktor","description":"Template for WordPress plugins, it took 7️⃣ years to write","archived":false,"fork":false,"pushed_at":"2025-02-14T10:22:29.000Z","size":86,"stargazers_count":67,"open_issues_count":8,"forks_count":3,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-24T03:45:20.158Z","etag":null,"topics":["composer","editorconfig","php","phpcs","phpstan","wordpress","wordpress-plugin"],"latest_commit_sha":null,"homepage":"https://github.com/szepeviktor/wordpress-website-lifecycle","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/szepeviktor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-14T12:38:45.000Z","updated_at":"2025-02-14T16:29:42.000Z","dependencies_parsed_at":"2024-04-11T19:48:40.958Z","dependency_job_id":"974122db-a579-4130-ae88-dfe46f7c232b","html_url":"https://github.com/szepeviktor/starter-plugin","commit_stats":{"total_commits":73,"total_committers":1,"mean_commits":73.0,"dds":0.0,"last_synced_commit":"2c18e7dd1645005ff46fcd558eeae70bb6fb272d"},"previous_names":[],"tags_count":5,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/szepeviktor%2Fstarter-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/szepeviktor%2Fstarter-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/szepeviktor%2Fstarter-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/szepeviktor%2Fstarter-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/szepeviktor","download_url":"https://codeload.github.com/szepeviktor/starter-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250559993,"owners_count":21450168,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["composer","editorconfig","php","phpcs","phpstan","wordpress","wordpress-plugin"],"created_at":"2024-10-02T10:01:32.204Z","updated_at":"2025-10-05T00:48:25.907Z","avatar_url":"https://github.com/szepeviktor.png","language":"PHP","readme":"# Ultimate WordPress Plugin Main File\n\n_How to leave legacy technologies behind_\n\nSource code in [`plugin-name.php`](/plugin-name.php) needs PHP 8 which is present on more than\n[50% of WordPress installations](https://wordpress.org/about/stats/#php_versions).\n\n## Support my work\n\nPlease consider sponsoring me monthly if you use my packages in an agency.\n\n[![Sponsor](https://github.com/szepeviktor/.github/raw/master/.github/assets/github-like-sponsor-button.svg)](https://github.com/sponsors/szepeviktor)\n\n## Parts of plugin main file\n\n- [Header comment](https://developer.wordpress.org/plugins/plugin-basics/header-requirements/#header-fields)\n- [PHP strict types](https://www.php.net/manual/en/language.types.declarations.php#language.types.declarations.strict)\n- [PHP namespaces](https://www.php-fig.org/psr/psr-4/#2-specification)\n- Prevent direct execution\n- Load autoloader\n- Prevent double activation\n- Define constant values in an immutable container\n- Load translations\n- Check requirements\n  - PHP and WordPress minimum version\n  - Multisite installation\n  - Other plugins\n  - Current theme\n  - Composer packages\n- Hook plugin activation functions\n- Support [WP-CLI](https://wp-cli.org/)\n- Display admin notice and deactivate plugin on error\n\n:bulb: Anything else goes into a separate file.\n\n## What to avoid\n\n- :x: Global constants\n- :x: Global functions\n- :x: Classes without namespace\n- :x: Loading PHP files with `require`\n- :x: Code with [side-effects](https://www.php-fig.org/psr/psr-1/#23-side-effects) outside the main file\n- :x: Immediate execution without `add_action` in the main file\n- :x: Conditional function or class definitions\n\n---\n\n![Required PHP Version](https://img.shields.io/wordpress/plugin/required-php/bbpress)\n![Required WP Version](https://img.shields.io/wordpress/plugin/wp-version/bbpress)\n\n## Installation\n\n1. Get the plugin ZIP from ...\n1. Upload to Plugins / Add new / Upload `/wp-admin/plugin-install.php?tab=upload`\n\n## Usage\n\n1. Adjust settings ...\n1. Or add a hook `add_filter('project/enable', '__return_true');` to `functions.php`\n","funding_links":["https://github.com/sponsors/szepeviktor"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fszepeviktor%2Fstarter-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fszepeviktor%2Fstarter-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fszepeviktor%2Fstarter-plugin/lists"}