68% ship-2-anywhere

Code Review | Ship2Anywhere Plugin

WordPress plugin Ship2Anywhere Plugin scored68%from 54 tests.

About plugin

  • Plugin page: ship-2-anywhere
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.0
  • WordPress version: 6.3.1
  • First release: Apr 6, 2022
  • Latest release: Jun 9, 2022
  • Number of updates: 19
  • Update frequency: every 3.3 days
  • Top authors: developerbbamastro (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,329 total downloads


Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.74ms] Passed 4 tests

This is a short check of server-side resources used by Ship2Anywhere Plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0437.71 ▼3.76
Dashboard /wp-admin3.32 ▲0.0246.25 ▼1.47
Posts /wp-admin/edit.php3.37 ▲0.0248.90 ▼5.46
Add New Post /wp-admin/post-new.php5.92 ▲0.0484.83 ▼8.25
Media Library /wp-admin/upload.php3.25 ▲0.0234.10 ▼0.03

Server storage [IO: ▲0.05MB] [DB: ▲0.07MB] Passed 3 tests

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 31 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

An overview of browser requirements for Ship2Anywhere Plugin
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5814.48 ▲0.301.56 ▼0.3141.79 ▼0.81
Dashboard /wp-admin2,208 ▲235.90 ▲0.11107.79 ▲4.0438.21 ▼3.59
Posts /wp-admin/edit.php2,091 ▼12.05 ▲0.0642.99 ▲4.5536.29 ▲0.82
Add New Post /wp-admin/post-new.php1,529 ▼622.02 ▼1.25669.02 ▲44.8253.84 ▲6.62
Media Library /wp-admin/upload.php1,390 ▲24.21 ▼0.0292.30 ▼10.1941.76 ▼2.41

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/ship-2-anywhere/ship2anywhere.php+38
    Non-static method Ship2Anywhere_Deactivator::deactivate() should not be called statically
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/ship-2-anywhere/admin/partials/ship2anywhere-shop-order-custom-order-fields-partial.php
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/ship-2-anywhere/admin/partials/ship2anywhere-custom-order-fields-partial.php:1
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/ship-2-anywhere/admin/partials/ship2anywhere-shop-order-custom-order-fields-partial.php on line 2
    • > PHP Notice
      Undefined variable: order_fields in wp-content/plugins/ship-2-anywhere/admin/partials/ship2anywhere-shop-order-custom-order-fields-partial.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/ship-2-anywhere/includes/ship2anywhere-config.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Shipping_Method' not found in wp-content/plugins/ship-2-anywhere/includes/class-ship2anywhere-shipping-rules.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found


Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Tags: There are too many tags (16 tag instead of maximum 10)
The official readme.txt is a good inspiration

ship-2-anywhere/ship2anywhere.php 92% from 13 tests

The main file in "Ship2Anywhere Plugin" v. 1.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("ship-2-anywhere.php" instead of "ship2anywhere.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin1,323 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity9.93
▷ Minimum class complexity1.00
▷ Maximum class complexity52.00
Average method complexity2.43
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes00.00%
▷ Static methods88.99%
▷ Public methods7382.02%
▷ Protected methods00.00%
▷ Private methods1617.98%
▷ Named functions375.00%
▷ Anonymous functions125.00%
▷ Global constants11100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin