83% autocomplete-woocommerce-orders

Code Review | Autocomplete WooCommerce Orders

WordPress plugin Autocomplete WooCommerce Orders scored83%from 54 tests.

About plugin

  • Plugin page: autocomplete-wooc...
  • Plugin version: 3.1.7
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Nov 21, 2017
  • Latest release: Oct 24, 2023
  • Number of updates: 149
  • Update frequency: every 14.5 days
  • Top authors: quadlayers (79.87%)LiamMcArthur (20.81%)

Code review

54 tests

User reviews

110 reviews

Install metrics

40,000+ active /809,587 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.42MB] [CPU: ▼2.08ms] 75% from 4 tests

This is a short check of server-side resources used by Autocomplete WooCommerce Orders
Please take the time to fix the following items
  • CPU: Total CPU usage should be kept under 500.00ms (currently 504.07ms on /wp-admin/admin.php?page=wc-settings_suggestions)
PageMemory (MB)CPU Time (ms)
Home /3.89 ▲0.4236.39 ▼0.62
Dashboard /wp-admin3.81 ▲0.4648.38 ▼15.91
Posts /wp-admin/edit.php3.82 ▲0.4653.09 ▲8.97
Add New Post /wp-admin/post-new.php6.28 ▲0.3985.64 ▲1.79
Media Library /wp-admin/upload.php3.63 ▲0.3942.42 ▲6.43
Suggestions /wp-admin/admin.php?page=wc-settings_suggestions4.28504.07

Server storage [IO: ▲0.41MB] [DB: ▲0.06MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 87 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Autocomplete WooCommerce Orders
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,937 ▲19114.44 ▲0.081.80 ▲0.2339.76 ▼0.87
Dashboard /wp-admin2,315 ▲1385.59 ▼0.0891.13 ▲4.2139.65 ▼3.16
Posts /wp-admin/edit.php2,126 ▲262.02 ▼0.0240.55 ▲1.4337.86 ▲1.62
Add New Post /wp-admin/post-new.php1,548 ▲2223.23 ▲0.20666.29 ▼38.1250.91 ▲1.38
Media Library /wp-admin/upload.php1,425 ▲314.22 ▲0.07109.23 ▲7.9050.66 ▲4.21
Suggestions /wp-admin/admin.php?page=wc-settings_suggestions1,9542.4732.8257.69

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 15× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/autocomplete-woocommerce-orders/lib/backend/view/tabs.php:10
    • > PHP Fatal error
      Trait 'QuadLayers\\WP_Notice_Plugin_Promote\\Traits\\PluginDataByFile' not found in wp-content/plugins/autocomplete-woocommerce-orders/jetpack_vendor/quadlayers/wp-notice-plugin-promote/src/PluginByFile.php on line 20
    • > PHP Fatal error
      Uncaught Error: Interface 'Composer\\Plugin\\PluginInterface' not found in wp-content/plugins/autocomplete-woocommerce-orders/vendor/automattic/jetpack-composer-plugin/src/class-plugin.php:24
    • > PHP Fatal error
      Trait 'QuadLayers\\WP_Notice_Plugin_Promote\\Traits\\PluginActions' not found in wp-content/plugins/autocomplete-woocommerce-orders/jetpack_vendor/quadlayers/wp-notice-plugin-promote/src/PluginBySlugV2.php on line 20
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/autocomplete-woocommerce-orders/jetpack_vendor/quadlayers/wp-plugin-suggestions/src/Table.php on line 14
    • > PHP Fatal error
      Trait 'QuadLayers\\WP_Notice_Plugin_Promote\\Traits\\PluginActionsLinks' not found in wp-content/plugins/autocomplete-woocommerce-orders/jetpack_vendor/quadlayers/wp-notice-plugin-promote/src/Traits/PluginActions.php on line 20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/autocomplete-woocommerce-orders/lib/backend/view/header.php:11
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-plugin-install-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/autocomplete-woocommerce-orders/jetpack_vendor/quadlayers/wp-plugin-suggestions/src/Table.php on line 14
    • > PHP Fatal error
      Trait 'QuadLayers\\WP_Notice_Plugin_Promote\\Traits\\PluginActions' not found in wp-content/plugins/autocomplete-woocommerce-orders/jetpack_vendor/quadlayers/wp-notice-plugin-promote/src/PluginBySlug.php on line 20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/autocomplete-woocommerce-orders/lib/backend/view/header.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots require images: #1 (Set the products as "Virtual" products), #2 (In your PayPal account browse "Seller preferences" under "Selling Tools"), #3 (Click on "Instant Payment Notifications"), #4 (Activate IPN notifications and insert the link as in the picture (using your own domain name)), #5 (Ensure that your main email is the same email you are using to receive payments), #6 (Browse WooCommerce > Settings > Extra Options), #7 (Pick the mode that suits you best)
The official readme.txt might help

autocomplete-woocommerce-orders/autocomplete-woocommerce-orders.php 92% from 13 tests

The main file in "Autocomplete WooCommerce Orders" v. 3.1.7 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Requires at least: Required version does not match the one declared in readme.txt ("4.7" instead of "4.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin4,208 lines of code in 69 files:
LanguageFilesBlank linesComment linesLines of code
PHP525711,8542,967
Markdown122690728
JSON100458
JavaScript391455
CSS1100

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity14.73
▷ Minimum class complexity1.00
▷ Maximum class complexity91.00
Average method complexity3.19
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces14
Interfaces0
Traits3
Classes23
▷ Abstract classes00.00%
▷ Concrete classes23100.00%
▷ Final classes14.35%
Methods153
▷ Static methods5032.68%
▷ Public methods12883.66%
▷ Protected methods00.00%
▷ Private methods2516.34%
Functions21
▷ Named functions14.76%
▷ Anonymous functions2095.24%
Constants23
▷ Global constants23100.00%
▷ Class constants00.00%
▷ Public constants00.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/backend/img/logo.png2.04KB2.13KB0.00%