83% aftership-woocommerce-tracking

Code Review | AfterShip Tracking - All-In-One WooCommerce Order Tracking (Free plan available)

WordPress plugin AfterShip Tracking - All-In-One WooCommerce Order Tracking (Free plan available) scored83%from 54 tests.

About plugin

  • Plugin page: aftership-woocomm...
  • Plugin version: 1.17.6
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9-6.3
  • WordPress version: 6.3.1
  • First release: Aug 19, 2014
  • Latest release: Nov 30, 2023
  • Number of updates: 258
  • Update frequency: every 13.1 days
  • Top authors: aftership (100%)

Code review

54 tests

User reviews

616 reviews

Install metrics

10,000+ active /960,082 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 gracefully, with no errors

Server metrics [RAM: ▲0.09MB] [CPU: ▼10.27ms] Passed 4 tests

Server-side resources used by AfterShip Tracking - All-In-One WooCommerce Order Tracking (Free plan available)
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1037.48 ▼7.56
Dashboard /wp-admin3.40 ▲0.1047.58 ▼4.04
Posts /wp-admin/edit.php3.51 ▲0.1647.13 ▼8.95
Add New Post /wp-admin/post-new.php5.98 ▲0.0985.91 ▼20.51
Media Library /wp-admin/upload.php3.32 ▲0.0941.46 ▲4.97

Server storage [IO: ▲3.51MB] [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: 138 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

AfterShip Tracking - All-In-One WooCommerce Order Tracking (Free plan available): an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲5414.24 ▼0.171.65 ▼0.0037.99 ▼5.40
Dashboard /wp-admin2,198 ▲245.63 ▲0.0992.95 ▼12.7842.89 ▼5.51
Posts /wp-admin/edit.php2,100 ▼31.95 ▼0.0639.10 ▼5.5036.22 ▼5.99
Add New Post /wp-admin/post-new.php1,531 ▼323.38 ▼1.74650.93 ▼25.8954.23 ▼8.69
Media Library /wp-admin/upload.php1,400 ▲34.19 ▼0.05110.96 ▲12.2147.94 ▲6.02

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      Use of undefined constant AFTERSHIP_PATH - assumed 'AFTERSHIP_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/aftership-woocommerce-tracking/includes/api/aftership/v1/class-am-rest-settings-controller.php on line 5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_REST_Controller' not found in wp-content/plugins/aftership-woocommerce-tracking/includes/api/class-am-rest-controller.php:5
    • > PHP Warning
      include(): Failed opening 'AFTERSHIP_PATH/includes/api/class-am-rest-controller.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/aftership-woocommerce-tracking/includes/api/aftership/v1/class-am-rest-settings-controller.php on line 5
    • > PHP Fatal error
      Uncaught Error: Class 'AM_REST_Controller' not found in wp-content/plugins/aftership-woocommerce-tracking/includes/api/aftership/v1/class-am-rest-settings-controller.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'WP_REST_Controller' not found in wp-content/plugins/aftership-woocommerce-tracking/includes/api/class-am-rest-controller.php:5
    • > PHP Warning
      include(AFTERSHIP_PATH/includes/api/class-am-rest-controller.php): failed to open stream: No such file or directory in wp-content/plugins/aftership-woocommerce-tracking/includes/api/aftership/v1/class-am-rest-settings-controller.php on line 5

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 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Screenshots: Screenshot #1 (Shipments dashboard) image not found
  • Tags: Please reduce the number of tags, currently 13 tag instead of maximum 10
Please take inspiration from this readme.txt

aftership-woocommerce-tracking/aftership-woocommerce-tracking.php 92% from 13 tests

The primary PHP file in "AfterShip Tracking - All-In-One WooCommerce Order Tracking (Free plan available)" version 1.17.6 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Plugin Name: A shorter plugin name is better (currently 80 characters long instead of max. 70)

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
Success! There were no dangerous files found in this plugin26,638 lines of code in 111 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1557239,406
JSON6008,978
PHP351,0422,0165,698
TypeScript226691,013
SVG800629
CSS1598198547
Sass7140314
Markdown113020
XML12019
HTML11114

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity27.65
▷ Minimum class complexity1.00
▷ Maximum class complexity126.00
Average method complexity4.17
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes25
▷ Abstract classes00.00%
▷ Concrete classes25100.00%
▷ Final classes00.00%
Methods225
▷ Static methods167.11%
▷ Public methods18582.22%
▷ Protected methods94.00%
▷ Private methods3113.78%
Functions11
▷ Named functions1090.91%
▷ Anonymous functions19.09%
Constants29
▷ Global constants1448.28%
▷ Class constants1551.72%
▷ Public constants15100.00%

Plugin size 0% from 2 tests

Image compression 0% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
16 PNG files occupy 1.46MB with 1.19MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
(invalid) assets/screenshot-6.png78.29KB0.00KB▼ 100.00%
(invalid) assets/screenshot-1.png58.76KB0.00KB▼ 100.00%
assets/banner-1544x500.png138.88KB62.72KB▼ 54.84%
assets/icon-128x128.png2.92KB1.41KB▼ 51.62%
(invalid) assets/screenshot-5.png73.42KB0.00KB▼ 100.00%