73% deployer-for-git

Code Review | Deployer for Git

WordPress plugin Deployer for Git scored73%from 54 tests.

About plugin

  • Plugin page: deployer-for-git
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.3
  • WordPress version: 6.3.1
  • First release: Dec 2, 2023
  • Latest release: Dec 2, 2023
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: alex91ckua (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /11 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲5.26MB] [CPU: ▲10.84ms] 75% from 4 tests

This is a short check of server-side resources used by Deployer for Git
The following require your attention
  • Extra RAM: Extra memory usage must be kept under 5MB (currently 5.26MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /9.26 ▲5.7965.21 ▲18.45
Dashboard /wp-admin9.28 ▲5.9377.92 ▲15.93
Posts /wp-admin/edit.php9.28 ▲5.9289.89 ▲44.74
Add New Post /wp-admin/post-new.php9.28 ▲3.3966.15 ▼21.93
Media Library /wp-admin/upload.php9.28 ▲6.0568.09 ▲30.91
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius9.2863.63

Server storage [IO: ▲3.16MB] [DB: ▲0.00MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 236 new files
Database: no new tables, 10 new options
New WordPress options
can_compress_scripts
fs_active_plugins
fs_debug_mode
db_upgraded
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
deployer_for_git_api_secret
fs_accounts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Deployer for Git
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲8314.25 ▲0.031.62 ▼0.2729.07 ▼16.75
Dashboard /wp-admin2,232 ▲545.57 ▼0.1797.11 ▼44.2746.01 ▲3.15
Posts /wp-admin/edit.php2,141 ▲441.99 ▼0.0341.92 ▲5.3640.39 ▲3.95
Add New Post /wp-admin/post-new.php1,551 ▲2223.14 ▲0.15653.41 ▲44.5948.93 ▼7.41
Media Library /wp-admin/upload.php1,437 ▲434.23 ▲0.0698.76 ▲0.3745.52 ▲3.98
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius1,1081.6627.1427.76

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/deployer-for-git/freemius/includes/class-freemius.php+8546
    Undefined property: stdClass::$plugins
  • This plugin did not uninstall successfully, leaving 10 options in the database
    • db_upgraded
    • fs_debug_mode
    • fs_active_plugins
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • deployer_for_git_api_secret
    • fs_accounts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 15× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/deployer-for-git/includes/PluginInstallerSkin.php on line 5
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-upgrader-skin.php' (include_path='.:/usr/share/php') in wp-content/plugins/deployer-for-git/includes/PluginInstallerSkin.php on line 5
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-upgrader-skin.php): failed to open stream: No such file or directory in wp-content/plugins/deployer-for-git/includes/ThemeInstallerSkin.php on line 5
    • > PHP Fatal error
      Uncaught Error: Class 'DeployerForGit\\Providers\\BaseProvider' not found in wp-content/plugins/deployer-for-git/includes/Providers/GitlabProvider.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'DeployerForGit\\Providers\\BaseProvider' not found in wp-content/plugins/deployer-for-git/includes/Providers/GithubProvider.php:10
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-upgrader-skin.php): failed to open stream: No such file or directory in wp-content/plugins/deployer-for-git/includes/WPUpgraderSkin.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'DeployerForGit\\Subpages\\InstallPackage' not found in wp-content/plugins/deployer-for-git/includes/Subpages/InstallPluginPage/InstallPlugin.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'DeployerForGit\\Providers\\BaseProvider' not found in wp-content/plugins/deployer-for-git/includes/Providers/GiteaProvider.php:10
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-upgrader-skin.php): failed to open stream: No such file or directory in wp-content/plugins/deployer-for-git/includes/PluginInstallerSkin.php on line 5
    • > PHP Fatal error
      Uncaught Error: Class 'DeployerForGit\\Providers\\BaseProvider' not found in wp-content/plugins/deployer-for-git/includes/Providers/BitbucketProvider.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention: You can look at the official readme.txt

deployer-for-git/deployer-for-git.php 85% from 13 tests

This is the main PHP file of "Deployer for Git" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Requires at least: Required version must match the one declared in readme.txt ("4.6" instead of "4.4")
  • Text Domain: Please use dashes and lowercase characters for text domains

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected36,100 lines of code in 180 files:
LanguageFilesBlank linesComment linesLines of code
PHP1578,57218,41635,610
JavaScript45562291
CSS14331179
SVG40015
JSON1005

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Please tend to the following items
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 3,096)
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity62.87
▷ Minimum class complexity1.00
▷ Maximum class complexity3,096.00
Average method complexity4.37
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces11
Interfaces1
Traits0
Classes75
▷ Abstract classes22.67%
▷ Concrete classes7397.33%
▷ Final classes00.00%
Methods1,427
▷ Static methods23716.61%
▷ Public methods99970.01%
▷ Protected methods231.61%
▷ Private methods40528.38%
Functions104
▷ Named functions10197.12%
▷ Anonymous functions32.88%
Constants150
▷ Global constants10368.67%
▷ Class constants4731.33%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/deployer-for-git.png7.59KB4.74KB▼ 37.51%