83% automizely-returnscenter

Code Review | AfterShip Returns – automated return, exchange, and refund management for WooCommerce

WordPress plugin AfterShip Returns – automated return, exchange, and refund management for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: automizely-return...
  • Plugin version: 1.0.14
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-6.3
  • WordPress version: 6.3.1
  • First release: Nov 30, 2021
  • Latest release: Nov 14, 2023
  • Number of updates: 16
  • Update frequency: every 45.4 days
  • Top authors: aftership (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

200+ active /3,693 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.10MB] [CPU: ▼8.25ms] Passed 4 tests

An overview of server-side resources used by AfterShip Returns – automated return, exchange, and refund management for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1342.12 ▼6.13
Dashboard /wp-admin3.41 ▲0.0650.50 ▼12.36
Posts /wp-admin/edit.php3.53 ▲0.1752.60 ▲1.86
Add New Post /wp-admin/post-new.php6.00 ▲0.1088.16 ▼16.36
Media Library /wp-admin/upload.php3.34 ▲0.1039.01 ▲6.27

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 31 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for AfterShip Returns – automated return, exchange, and refund management for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,892 ▲13014.68 ▲0.342.14 ▲0.2944.24 ▲2.71
Dashboard /wp-admin2,260 ▲835.64 ▲0.0794.55 ▼9.1278.73 ▲31.75
Posts /wp-admin/edit.php2,161 ▲611.98 ▲0.0236.37 ▼1.3033.54 ▼2.86
Add New Post /wp-admin/post-new.php1,585 ▲5923.04 ▼0.17701.00 ▲52.6952.07 ▼6.55
Media Library /wp-admin/upload.php1,455 ▲584.19 ▼0.08101.11 ▼3.4862.22 ▲19.55

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options were found after uninstall: 7 options
    • returnscenter_option_name
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • 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)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_REST_Controller' not found in wp-content/plugins/automizely-returnscenter/includes/api/class-am-rest-controller.php:5
    • > PHP Warning
      include(): Failed opening 'AUTOMIZELY_RETURNSCENTER_PATH/includes/api/class-am-rest-controller.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/automizely-returnscenter/includes/api/returnscenter/v1/class-am-rc-rest-settings-controller.php on line 5
    • > PHP Fatal error
      Uncaught Error: Class 'AM_REST_Controller' not found in wp-content/plugins/automizely-returnscenter/includes/api/returnscenter/v1/class-am-rc-rest-settings-controller.php:10
    • > PHP Warning
      Use of undefined constant AUTOMIZELY_RETURNSCENTER_PATH - assumed 'AUTOMIZELY_RETURNSCENTER_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/automizely-returnscenter/includes/api/returnscenter/v1/class-am-rc-rest-settings-controller.php on line 5
    • > PHP Warning
      include(AUTOMIZELY_RETURNSCENTER_PATH/includes/api/class-am-rest-controller.php): failed to open stream: No such file or directory in wp-content/plugins/automizely-returnscenter/includes/api/returnscenter/v1/class-am-rc-rest-settings-controller.php on line 5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: reverse logistics, post-purchase, rma, warranty, automation...

automizely-returnscenter/automizely-returnscenter.php 85% from 13 tests

The entry point to "AfterShip Returns – automated return, exchange, and refund management for WooCommerce" version 1.0.14 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Plugin Name: It is recommended to keep the plugin name shorter than 70 characters (currently 87 characters long)
  • Description: Please don't use more than 140 characters for the plugin description (currently 144 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin1,014 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP5111198568
CSS275131285
SVG700132
JSON10029

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity14.00
▷ Minimum class complexity4.00
▷ Maximum class complexity25.00
Average method complexity2.49
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods35
▷ Static methods411.43%
▷ Public methods2982.86%
▷ Protected methods00.00%
▷ Private methods617.14%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 0% from 2 tests

Image compression 0% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
13 PNG files occupy 1.95MB with 1.40MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-1544x500.png138.88KB62.72KB▼ 54.84%
(invalid) assets/screenshot-4.png62.26KB0.00KB▼ 100.00%
(invalid) assets/screenshot-1.png64.91KB0.00KB▼ 100.00%
assets/banner-772x250.png55.23KB25.21KB▼ 54.35%
assets/icon-256x256.png7.03KB3.44KB▼ 51.01%