79% shipment-based-product-for-ali2woo

Code Review | Shipping-Based Products for woocommerce and Ali2Woo

WordPress plugin Shipping-Based Products for woocommerce and Ali2Woo scored79%from 54 tests.

About plugin

  • Plugin page: shipment-based-pr...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Jul 3, 2020
  • Latest release: Nov 20, 2022
  • Number of updates: 13
  • Update frequency: every 67.0 days
  • Top authors: vanbom (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /938 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▼0.87MB] [CPU: ▼32.56ms] Passed 4 tests

An overview of server-side resources used by Shipping-Based Products for woocommerce and Ali2Woo
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0540.80 ▲0.76
Dashboard /wp-admin3.07 ▼0.2324.63 ▼23.76
Posts /wp-admin/edit.php3.07 ▼0.2927.21 ▼24.10
Add New Post /wp-admin/post-new.php3.07 ▼2.8223.22 ▼73.39
Media Library /wp-admin/upload.php3.07 ▼0.1626.23 ▼8.99

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Shipping-Based Products for woocommerce and Ali2Woo: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲8813.32 ▼1.461.59 ▼0.0044.18 ▲1.50
Dashboard /wp-admin2,229 ▲405.88 ▲0.94100.91 ▼12.6439.76 ▼5.44
Posts /wp-admin/edit.php2,114 ▲252.05 ▼0.0039.20 ▼1.3536.56 ▲0.97
Add New Post /wp-admin/post-new.php1,537 ▲2317.59 ▼6.02697.05 ▼25.1952.93 ▼21.31
Media Library /wp-admin/upload.php1,408 ▲174.16 ▼0.0499.44 ▼13.9340.92 ▼7.76

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-includes/functions.php+6691
    file_get_contents(wp-content/plugins/ali2woo/ali2woo.php): failed to open stream: No such file or directory
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests Passed 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 Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 86% 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:
  • Donate link: Invalid url: "paypal.me/younesdro"
The official readme.txt is a good inspiration

shipment-based-product-for-ali2woo/wc-aliexpress-shipping-based-product.php 77% from 13 tests

The principal PHP file in "Shipping-Based Products for woocommerce and Ali2Woo" v. 1.0.1 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Requires at least: Required version must be the same as the one declared in readme.txt ("5.3.2" instead of "3.7.0")
  • Main file name: Name the main plugin file the same as the plugin slug ("shipment-based-product-for-ali2woo.php" instead of "wc-aliexpress-shipping-based-product.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin515 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP10202289419
PO File1181982
CSS24814

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity9.50
▷ Minimum class complexity6.00
▷ Maximum class complexity13.00
Average method complexity1.71
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods48
▷ Static methods1122.92%
▷ Public methods4797.92%
▷ Protected methods12.08%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants00.00%
▷ Class constants4100.00%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin