77% ali2woo-lite

Code Review | AliExpress Dropshipping with AliNext Lite

WordPress plugin AliExpress Dropshipping with AliNext Lite scored77%from 54 tests.

About plugin

  • Plugin page: ali2woo-lite
  • Plugin version: 3.1.4
  • PHP compatiblity: 8.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.4
  • WordPress version: 6.3.1
  • First release: Mar 16, 2019
  • Latest release: Nov 23, 2023
  • Number of updates: 86
  • Update frequency: every 19.9 days
  • Top authors: ali2woo (100%)

Code review

54 tests

User reviews

25 reviews

Install metrics

3,000+ active /106,851 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▲0.30ms] Passed 4 tests

An overview of server-side resources used by AliExpress Dropshipping with AliNext Lite
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.98 ▼5.31
Dashboard /wp-admin3.31 ▲0.0047.55 ▲1.19
Posts /wp-admin/edit.php3.36 ▲0.0049.28 ▲2.25
Add New Post /wp-admin/post-new.php5.89 ▲0.0095.78 ▲4.11
Media Library /wp-admin/upload.php3.23 ▲0.0035.73 ▲3.08

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 538 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by AliExpress Dropshipping with AliNext Lite
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲314.21 ▼0.121.78 ▼0.2739.66 ▼3.79
Dashboard /wp-admin2,198 ▲275.59 ▼0.0582.96 ▼20.3335.89 ▼8.60
Posts /wp-admin/edit.php2,100 ▼32.02 ▲0.0136.86 ▼3.6635.67 ▼3.04
Add New Post /wp-admin/post-new.php1,526 ▼423.65 ▲0.55646.98 ▼17.7153.05 ▲3.66
Media Library /wp-admin/upload.php1,394 ▼64.16 ▼0.0399.94 ▲0.9144.77 ▲2.39

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
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

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
Even though everything seems fine, this is not 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
Please fix the following
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/ali2woo-lite/view/emails/email-footer.php
    • > /wp-content/plugins/ali2woo-lite/view/settings/settings_footer.php
  • 188× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'AliNext_Lite\\Lib\\Requests_Exception_HTTP' not found in wp-content/plugins/ali2woo-lite/includes/libs/Requests/Requests/Exception/HTTP/406.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'AliNext_Lite\\Lib\\Requests_Exception' not found in wp-content/plugins/ali2woo-lite/includes/libs/Requests/Requests/Exception/HTTP.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'AliNext_Lite\\AbstractAdminPage' not found in wp-content/plugins/ali2woo-lite/includes/classes/controller/AddonsController.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'Invoker\\ParameterResolver\\ParameterResolver' not found in wp-content/plugins/ali2woo-lite/vendor/php-di/invoker/src/ParameterResolver/Container/TypeHintContainerResolver.php:13
    • > PHP Parse error
      syntax error, unexpected 'private' (T_PRIVATE), expecting variable (T_VARIABLE) in wp-content/plugins/ali2woo-lite/vendor/php-di/php-di/src/Definition/Resolver/ResolverDispatcher.php on line 37
    • > PHP Fatal error
      Uncaught Error: Class 'AliNext_Lite\\Lib\\Requests_Exception_HTTP' not found in wp-content/plugins/ali2woo-lite/includes/libs/Requests/Requests/Exception/HTTP/404.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'AliNext_Lite\\Lib\\Requests_Exception_HTTP' not found in wp-content/plugins/ali2woo-lite/includes/libs/Requests/Requests/Exception/HTTP/401.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/ali2woo-lite/view/product_data_tab.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'Laravel\\SerializableClosure\\Contracts\\Serializable' not found in wp-content/plugins/ali2woo-lite/vendor/laravel/serializable-closure/src/Serializers/Signed.php:9
    • > PHP Parse error
      syntax error, unexpected 'private' (T_PRIVATE), expecting variable (T_VARIABLE) in wp-content/plugins/ali2woo-lite/vendor/php-di/php-di/src/Attribute/Injectable.php on line 26

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention: The official readme.txt might help

ali2woo-lite/alinext-lite.php 85% from 13 tests

The principal PHP file in "AliExpress Dropshipping with AliNext Lite" v. 3.1.4 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: The principal plugin file should be the same as the plugin slug ("ali2woo-lite.php" instead of "alinext-lite.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin122,797 lines of code in 463 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript8116,92927,39969,700
PHP3267,3369,36833,806
CSS211,35115614,310
PO File16297251,972
JSON11001,302
Markdown114230946
SVG96212706
XML32155

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
It is recommended to fix the following
  • Method cyclomatic complexity should be reduced to less than 100 (currently 237)
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity21.27
▷ Minimum class complexity1.00
▷ Maximum class complexity676.00
Average method complexity4.52
▷ Minimum method complexity1.00
▷ Maximum method complexity237.00
Code structure
Namespaces31
Interfaces21
Traits0
Classes252
▷ Abstract classes72.78%
▷ Concrete classes24597.22%
▷ Final classes20.82%
Methods1,487
▷ Static methods21514.46%
▷ Public methods1,21681.78%
▷ Protected methods1036.93%
▷ Private methods16811.30%
Functions79
▷ Named functions4050.63%
▷ Anonymous functions3949.37%
Constants61
▷ Global constants1727.87%
▷ Class constants4472.13%
▷ Public constants4193.18%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
39 PNG files occupy 1.03MB with 0.46MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/logo_chrome.png1.98KB1.34KB▼ 32.55%
assets/img/icons/pipette.png0.88KB0.64KB▼ 27.81%
assets/img/stickers/stick-002.png76.81KB20.31KB▼ 73.55%
assets/img/logo-xs.png0.30KB0.24KB▼ 19.35%
assets/img/stickers/stick-003.png68.36KB21.68KB▼ 68.29%