74% skynet-shipping

Code Review | SkyNet Shipping WooCommerce Plugin

WordPress plugin SkyNet Shipping WooCommerce Plugin scored74%from 54 tests.

About plugin

  • Plugin page: skynet-shipping
  • Plugin version: 1.0.6
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Feb 9, 2023
  • Latest release: Jul 21, 2023
  • Number of updates: 8
  • Update frequency: every 22.1 days
  • Top authors: skynetza (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /258 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼8.48ms] Passed 4 tests

Server-side resources used by SkyNet Shipping WooCommerce Plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0042.76 ▼1.94
Dashboard /wp-admin3.31 ▼0.0452.91 ▼9.72
Posts /wp-admin/edit.php3.36 ▲0.0050.32 ▲1.23
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.00 ▼23.48
Media Library /wp-admin/upload.php3.23 ▲0.0037.08 ▲2.03

Server storage [IO: ▲0.37MB] [DB: ▲0.31MB] Passed 3 tests

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 97 new files
Database: 1 new table, 6 new options
New tables
wp_skynet_settings
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for SkyNet Shipping WooCommerce Plugin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,803 ▲4214.26 ▼0.011.86 ▲0.0743.67 ▲1.62
Dashboard /wp-admin2,192 ▲155.62 ▼0.0196.34 ▲3.6442.67 ▲5.70
Posts /wp-admin/edit.php2,097 ▼31.98 ▲0.0334.85 ▼6.3531.84 ▼4.77
Add New Post /wp-admin/post-new.php1,526 ▼223.16 ▲0.09654.77 ▼33.4956.50 ▼2.00
Media Library /wp-admin/upload.php1,397 ▼34.19 ▼0.01101.48 ▼2.6049.02 ▲3.24

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie tables were found after uninstall: 1 table
    • wp_skynet_settings
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
  • 26× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Dotenv\\Exception\\ExceptionInterface' not found in wp-content/plugins/skynet-shipping/includes/vendor/vlucas/phpdotenv/src/Exception/ValidationException.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'Dotenv\\Repository\\Adapter\\WriterInterface' not found in wp-content/plugins/skynet-shipping/includes/vendor/vlucas/phpdotenv/src/Repository/Adapter/ReplacingWriter.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'Dotenv\\Repository\\Adapter\\ReaderInterface' not found in wp-content/plugins/skynet-shipping/includes/vendor/vlucas/phpdotenv/src/Repository/Adapter/MultiReader.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'GrahamCampbell\\ResultType\\Result' not found in wp-content/plugins/skynet-shipping/includes/vendor/graham-campbell/result-type/src/Success.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'PhpOption\\Option' not found in wp-content/plugins/skynet-shipping/includes/vendor/phpoption/phpoption/src/PhpOption/Some.php:28
    • > PHP Fatal error
      Uncaught Error: Interface 'Dotenv\\Repository\\Adapter\\AdapterInterface' not found in wp-content/plugins/skynet-shipping/includes/vendor/vlucas/phpdotenv/src/Repository/Adapter/EnvConstAdapter.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'Dotenv\\Exception\\ExceptionInterface' not found in wp-content/plugins/skynet-shipping/includes/vendor/vlucas/phpdotenv/src/Exception/InvalidFileException.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/skynet-shipping/includes/functions.php:17
    • > PHP Fatal error
      Uncaught Error: Interface 'Dotenv\\Repository\\Adapter\\AdapterInterface' not found in wp-content/plugins/skynet-shipping/includes/vendor/vlucas/phpdotenv/src/Repository/Adapter/ApacheAdapter.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'Dotenv\\Repository\\Adapter\\ReaderInterface' not found in wp-content/plugins/skynet-shipping/includes/vendor/vlucas/phpdotenv/src/Repository/Adapter/AdapterInterface.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (Settings section.), #2 (The output at Checkout page.)
The official readme.txt is a good inspiration

skynet-shipping/woocommerce-skynet-plugin.php 92% from 13 tests

"SkyNet Shipping WooCommerce Plugin" version 1.0.6's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("skynet-shipping.php" instead of "woocommerce-skynet-plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin8,812 lines of code in 88 files:
LanguageFilesBlank linesComment linesLines of code
PHP771,2182,6388,028
JSON700732
Markdown313036
make17016

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity8.88
▷ Minimum class complexity1.00
▷ Maximum class complexity162.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces16
Interfaces9
Traits0
Classes56
▷ Abstract classes23.57%
▷ Concrete classes5496.43%
▷ Final classes4074.07%
Methods412
▷ Static methods13633.01%
▷ Public methods36287.86%
▷ Protected methods00.00%
▷ Private methods5012.14%
Functions170
▷ Named functions11970.00%
▷ Anonymous functions5130.00%
Constants29
▷ Global constants931.03%
▷ Class constants2068.97%
▷ Public constants945.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin