52% auto-aliexpress-dropshipping

Code Review | Auto Aliexpress Dropshipping

WordPress plugin Auto Aliexpress Dropshipping scored52%from 54 tests.

About plugin

  • Plugin page: auto-aliexpress-d...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.8
  • WordPress version: 6.3.1
  • First release: Sep 27, 2021
  • Latest release: Sep 29, 2021
  • Number of updates: 5
  • Update frequency: every 0.4 days
  • Top authors: darell (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /506 total downloads

Benchmarks

Plugin footprint 48% 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: ▼1.86MB] [CPU: ▼51.40ms] Passed 4 tests

This is a short check of server-side resources used by Auto Aliexpress Dropshipping
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.13 ▼1.334.59 ▼33.85
Dashboard /wp-admin2.15 ▼1.155.20 ▼42.73
Posts /wp-admin/edit.php2.15 ▼1.206.34 ▼38.18
Add New Post /wp-admin/post-new.php2.15 ▼3.735.34 ▼90.83
Media Library /wp-admin/upload.php2.15 ▼1.084.88 ▼27.96
Welcome /wp-admin/admin.php?page=auto-aliexpress-welcome2.155.77
Campaigns /wp-admin/admin.php?page=auto-aliexpress-campaign2.156.42
Dashboard /wp-admin/admin.php?page=auto-aliexpress2.155.23
New Campaigns /wp-admin/admin.php?page=auto-aliexpress-campaign-wizard2.156.48

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 150 new files
Database: 1 new table, 7 new options
New tables
wp_auto_aliexpress_logs
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded
theysaidso_admin_options
auto_aliexpress_version_pro
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Auto Aliexpress Dropshipping
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲5914.17 ▼0.381.79 ▲0.2646.83 ▲8.90
Dashboard /wp-admin2,229 ▲515.57 ▼0.0984.70 ▼10.6336.07 ▼11.99
Posts /wp-admin/edit.php2,131 ▲312.02 ▲0.0439.98 ▲2.1234.68 ▲3.50
Add New Post /wp-admin/post-new.php1,553 ▲1623.35 ▲5.31665.65 ▲66.5562.64 ▼8.14
Media Library /wp-admin/upload.php1,428 ▲344.22 ▲0.0393.68 ▼9.0042.10 ▼3.02
Welcome /wp-admin/admin.php?page=auto-aliexpress-welcome1,5472.0329.61105.72
Campaigns /wp-admin/admin.php?page=auto-aliexpress-campaign1,4125.1063.3551.19
Dashboard /wp-admin/admin.php?page=auto-aliexpress1,4915.0558.2886.09
New Campaigns /wp-admin/admin.php?page=auto-aliexpress-campaign-wizard2,3745.6569.5597.48

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin cannot be uninstalled
    • > User deprecated in wp-includes/class-requests.php+24
    The PSR-0 `Requests_...` class names in the Requests library are deprecated. Switch to the PSR-4 `WpOrg\Requests\...` class names at your earliest convenience.
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_auto_aliexpress_logs
  • This plugin does not fully uninstall, leaving 7 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • auto_aliexpress_version_pro
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=auto-aliexpress-campaign-wizard
    • > User deprecated in wp-includes/class-requests.php+24
    The PSR-0 `Requests_...` class names in the Requests library are deprecated. Switch to the PSR-4 `WpOrg\Requests\...` class names at your earliest convenience.
    • > GET request to /wp-admin/admin.php?page=auto-aliexpress-campaign-wizard
    • > Notice in wp-content/plugins/auto-aliexpress-dropshipping/admin/views/campaigns/wizard/sections/tab-category.php+72
    Undefined index: aliexpress-post-category
    • > GET request to /wp-admin/admin.php?page=auto-aliexpress-campaign-wizard
    • > Warning in wp-content/plugins/auto-aliexpress-dropshipping/includes/helpers/helper-forms.php+135
    in_array() expects parameter 2 to be array, null given

SRP 50% 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
  • 73× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Requests_Auth' not found in wp-content/plugins/auto-aliexpress-dropshipping/includes/library/Requests/Requests/Auth/Basic.php:18
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/auto-aliexpress-dropshipping/admin/views/campaigns/list/content.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Requests_Exception_HTTP' not found in wp-content/plugins/auto-aliexpress-dropshipping/includes/library/Requests/Requests/Exception/HTTP/411.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Requests_Exception_HTTP' not found in wp-content/plugins/auto-aliexpress-dropshipping/includes/library/Requests/Requests/Exception/HTTP/Unknown.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_types() in wp-content/plugins/auto-aliexpress-dropshipping/admin/views/campaigns/wizard/sections/tab-category.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Requests_Exception_HTTP' not found in wp-content/plugins/auto-aliexpress-dropshipping/includes/library/Requests/Requests/Exception/HTTP/405.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Requests_Exception_HTTP' not found in wp-content/plugins/auto-aliexpress-dropshipping/includes/library/Requests/Requests/Exception/HTTP/409.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Requests_Exception_HTTP' not found in wp-content/plugins/auto-aliexpress-dropshipping/includes/library/Requests/Requests/Exception/HTTP/501.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function auto_aliexpress_get_addon_data() in wp-content/plugins/auto-aliexpress-dropshipping/admin/views/integrations/popups/facebook.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Requests_Exception_HTTP' not found in wp-content/plugins/auto-aliexpress-dropshipping/includes/library/Requests/Requests/Exception/HTTP/431.php:15

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There are user-side issues you should fix
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=auto-aliexpress-campaign-wizard
    • > Console-api (warning) in unknown
    https://unpkg.com/ionicons@5.0.0/dist/ionicons.js?ver=1.0.1 26:10 "[ionicons] Deprecated script, please remove: \u003Cscript src=\"https://unpkg.com/ionicons@5.0.0/dist/ionicons.js?ver=1.0.1\" id=\"ionicons-js\">\u003C/script>\nTo improve performance it is recommended to set the differential scripts in the head as follows:\n\u003Cscript type=\"module\" src=\"https://unpkg.com/ionicons@5.0.0/dist/ionicons/ionicons.esm.js\">\u003C/script>\n\u003Cscript nomodule=\"\" src=\"https://unpkg.com/ionicons@5.0.0/dist/ionicons/ionicons.js\">\u003C/script>"
    • > GET request to /wp-admin/admin.php?page=auto-aliexpress-welcome
    • > Rendering (severe) in unknown
    /wp-admin/admin.php?page=auto-aliexpress-welcome 390 Error: attribute height: Expected length, "16\u003E".
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=auto-aliexpress
    • > Network (severe)
    https://fonts.googleapis.com/css?family=Aliexpresso+Condensed%3A300%2C300i%2C400%2C400i%2C700%2C700i%7CAliexpresso%3A300%2C300i%2C400%2C400i%2C500%2C500i%2C700%2C700i&ver=1.0.0 - Failed to load resource: the server responded with a status of 400 ()

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% 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 to be fixed:
  • Tags: Please delete some tags, you are using 13 tag instead of maximum 10
You can take inspiration from this readme.txt

auto-aliexpress-dropshipping/auto-aliexpress-dropshipping.php Passed 13 tests

This is the main PHP file of "Auto Aliexpress Dropshipping" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
44 characters long description:
Auto Aliexpress dropshipping for Woocommerce

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin13,459 lines of code in 134 files:
LanguageFilesBlank linesComment linesLines of code
PHP1222,3775,2419,471
CSS4365373,030
JavaScript8340320958

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity16.93
▷ Minimum class complexity1.00
▷ Maximum class complexity249.00
Average method complexity4.02
▷ Minimum method complexity1.00
▷ Maximum method complexity66.00
Code structure
Namespaces0
Interfaces4
Traits0
Classes82
▷ Abstract classes56.10%
▷ Concrete classes7793.90%
▷ Final classes00.00%
Methods463
▷ Static methods6714.47%
▷ Public methods38984.02%
▷ Protected methods5912.74%
▷ Private methods153.24%
Functions34
▷ Named functions34100.00%
▷ Anonymous functions00.00%
Constants54
▷ Global constants2648.15%
▷ Class constants2851.85%
▷ Public constants28100.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 0.66MB with 0.35MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/flickr.png23.07KB12.12KB▼ 47.45%
assets/images/auto-robot-new-campaign.png166.04KB46.46KB▼ 72.02%
assets/images/facebook.png14.41KB6.87KB▼ 52.33%
assets/images/aliexpress.png14.46KB8.97KB▼ 37.97%
assets/images/vimeo.png27.81KB12.03KB▼ 56.74%