83% waaship

Code Review | Waaship

WordPress plugin Waaship scored83%from 54 tests.

About plugin

  • Plugin page: waaship
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.8.2
  • WordPress version: 6.3.1
  • First release: Dec 28, 2021
  • Latest release: Jul 21, 2023
  • Number of updates: 11
  • Update frequency: every 51.8 days
  • Top authors: waaship (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,745 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.12MB] [CPU: ▼0.77ms] Passed 4 tests

A check of server-side resources used by Waaship
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1242.57 ▼1.36
Dashboard /wp-admin3.42 ▲0.1253.41 ▲0.49
Posts /wp-admin/edit.php3.54 ▲0.1851.79 ▲3.81
Add New Post /wp-admin/post-new.php6.01 ▲0.1388.53 ▼3.09
Media Library /wp-admin/upload.php3.34 ▲0.1237.09 ▲0.88

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Waaship
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲8113.32 ▼1.055.17 ▲3.4950.20 ▲5.68
Dashboard /wp-admin2,208 ▲205.85 ▼0.05105.06 ▲2.1244.21 ▼1.04
Posts /wp-admin/edit.php2,091 ▲22.02 ▼0.0139.15 ▲0.8134.79 ▲1.34
Add New Post /wp-admin/post-new.php1,539 ▲2518.13 ▲0.72696.03 ▲13.2762.33 ▲7.37
Media Library /wp-admin/upload.php1,387 ▼44.25 ▲0.13103.98 ▼0.8844.08 ▼0.66

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 18× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Warning
      require_once(WAASHIP_PLUGIN_DIRcontroller/status/WaashipAdminStatusController.php): failed to open stream: No such file or directory in wp-content/plugins/waaship/controller/status/WaashipStatusController.php on line 60
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/waaship/controller/shipping-method/class/WaashipFamilyMart.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/waaship/controller/shipping-method/class/WaashipSevenEleven.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/waaship/controller/shipping-method/class/WaashipCrossBorder.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/waaship/waaship.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/waaship/controller/order-list/OrderListController.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/waaship/controller/shipping-method/class/WaashipDailyLogistics.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/waaship/api/WaashipApiRouter.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/waaship/controller/shipping-method/class/WaashipHiLife.php:3
    • > PHP Warning
      require_once(WAASHIP_PLUGIN_DIRcontroller/shipping-method/AdminShippingMethodController.php): failed to open stream: No such file or directory in wp-content/plugins/waaship/controller/shipping-method/ShippingMethodController.php on line 41

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Screenshots: A description for screenshot #1 is required in waaship/assets to your readme.txt
  • Requires php: Version not formatted correctly
You can look at the official readme.txt

waaship/waaship.php 92% from 13 tests

The main file in "Waaship" v. 1.0.5 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Description: The plugin description must be longer than 10 characters (currently 7 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin858 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP189528820
CSS15038

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity1.50
▷ Minimum class complexity1.00
▷ Maximum class complexity4.00
Average method complexity1.17
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods41
▷ Static methods00.00%
▷ Public methods4097.56%
▷ Protected methods00.00%
▷ Private methods12.44%
Functions25
▷ Named functions1352.00%
▷ Anonymous functions1248.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.09MB with 0.05MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/shipment.png44.73KB18.71KB▼ 58.18%
img/ready-to-ship.png52.01KB23.06KB▼ 55.66%