67% woo-aliexpress

Code Review | AliExpress for WooCommerce

WordPress plugin AliExpress for WooCommerce scored67%from 54 tests.

About plugin

  • Plugin page: woo-aliexpress
  • Plugin version: 1.7.14
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Sep 25, 2019
  • Latest release: Oct 2, 2023
  • Number of updates: 132
  • Update frequency: every 11.1 days
  • Top authors: wecommsolutions (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

400+ active /48,248 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.21MB] [CPU: ▼4.85ms] Passed 4 tests

This is a short check of server-side resources used by AliExpress for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2434.45 ▼3.00
Dashboard /wp-admin3.56 ▲0.2144.92 ▼15.76
Posts /wp-admin/edit.php3.61 ▲0.2548.01 ▲0.35
Add New Post /wp-admin/post-new.php6.09 ▲0.2192.31 ▼0.99
Media Library /wp-admin/upload.php3.42 ▲0.1936.36 ▲3.36

Server storage [IO: ▲3.01MB] [DB: ▲0.08MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
Please try to fix the following items
  • The plugin illegally modified 1 file (0.69KB) outside of "wp-content/plugins/woo-aliexpress/" and "wp-content/uploads/"
    • (modified) .htaccess
Filesystem: 601 new files
Database: 6 new tables, 7 new options
New tables
wp_aew_mapping_carriers
wp_aew_data_default
wp_aew_mapping_features
wp_aew_products_error
wp_aew_jobs
wp_aew_mapping_attributes
New WordPress options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
AEW_TOKEN_CRON
widget_recent-comments
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for AliExpress for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲9413.62 ▼1.121.71 ▲0.1341.80 ▲0.78
Dashboard /wp-admin2,240 ▲495.44 ▲0.39115.68 ▲12.6640.71 ▼4.42
Posts /wp-admin/edit.php2,108 ▲192.39 ▲0.3741.25 ▼0.9236.78 ▲2.83
Add New Post /wp-admin/post-new.php1,550 ▲1717.79 ▼5.67583.30 ▼98.1133.68 ▼18.13
Media Library /wp-admin/upload.php1,426 ▲354.70 ▲0.4795.81 ▼3.3338.83 ▼3.75

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 tables in the database
    • wp_aew_mapping_attributes
    • wp_aew_data_default
    • wp_aew_mapping_carriers
    • wp_aew_products_error
    • wp_aew_jobs
    • wp_aew_mapping_features
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • AEW_TOKEN_CRON
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/woo-aliexpress/views/general-options.php
  • 37× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Nahid\\JsonQ\\Tests\\TestCase' not found in wp-content/plugins/woo-aliexpress/inc/classes/AE0/Version_22_07/libs/jsonq/tests/Facades/Jsonq.php:11
    • > PHP Fatal error
      require_once(): Failed opening required '../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/woo-aliexpress/inc/classes/AE0/Version_22_07/libs/jsonq/examples/find.php on line 10
    • > PHP Fatal error
      Uncaught Error: Class 'Nahid\\JsonQ\\Tests\\AbstractTestCase' not found in wp-content/plugins/woo-aliexpress/inc/classes/AE0/Version_22_07/libs/jsonq/tests/ConditionTest.php:7
    • > PHP Fatal error
      require_once(): Failed opening required '../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/woo-aliexpress/inc/classes/AE0/Version_22_07/libs/jsonq/examples/sum.php on line 9
    • > PHP Warning
      require_once(../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/woo-aliexpress/inc/classes/AE0/Version_22_07/libs/jsonq/examples/find.php on line 10
    • > PHP Fatal error
      require_once(): Failed opening required '../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/woo-aliexpress/inc/classes/AE0/Version_22_07/libs/jsonq/examples/exists.php on line 9
    • > PHP Fatal error
      Uncaught Error: Class 'AEObject' not found in wp-content/plugins/woo-aliexpress/inc/classes/AE0/Version_22_07/AECarriers.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/woo-aliexpress/inc/classes/AE0/Version_22_07/libs/jsonq/tests/AbstractTestCase.php:5
    • > PHP Warning
      require_once(../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/woo-aliexpress/inc/classes/AE0/Version_22_07/libs/jsonq/examples/count.php on line 9
    • > PHP Fatal error
      require_once(): Failed opening required '../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/woo-aliexpress/inc/classes/AE0/Version_22_07/libs/jsonq/examples/count.php on line 9

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: orders, woocommerce, aliexpress

woo-aliexpress/woo-aliexpress.php 85% from 13 tests

The main file in "AliExpress for WooCommerce" v. 1.7.14 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("5.1" instead of "3.0")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected28,340 lines of code in 568 files:
LanguageFilesBlank linesComment linesLines of code
PHP5396,81511,85023,659
PO File27069451,716
JavaScript11162921,613
Markdown22640671
CSS104212560
JSON20077
XML10028
YAML15016

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
These items need your attention
  • Method cyclomatic complexity should be reduced to less than 100 (currently 138)
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity4.27
▷ Minimum class complexity1.00
▷ Maximum class complexity245.00
Average method complexity1.82
▷ Minimum method complexity1.00
▷ Maximum method complexity138.00
Code structure
Namespaces6
Interfaces1
Traits1
Classes522
▷ Abstract classes91.72%
▷ Concrete classes51398.28%
▷ Final classes00.00%
Methods2,080
▷ Static methods1376.59%
▷ Public methods1,98295.29%
▷ Protected methods422.02%
▷ Private methods562.69%
Functions6
▷ Named functions00.00%
▷ Anonymous functions6100.00%
Constants71
▷ Global constants1622.54%
▷ Class constants5577.46%
▷ Public constants55100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
13 PNG files occupy 1.36MB with 0.65MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
wordpress-org/icon-256x256.png13.40KB5.72KB▼ 57.29%
wordpress-org/icon-128x128.png4.81KB2.58KB▼ 46.46%
40px.png2.17KB1.84KB▼ 15.24%
wordpress-org/banner-1544x500.png258.55KB104.27KB▼ 59.67%
assets/aliexpress-woocommerce-1880x609.png318.33KB120.97KB▼ 62.00%