83% wc-order-search-admin

Code Review | WooCommerce Order Search Admin

WordPress plugin WooCommerce Order Search Admin scored 83% from 53 tests.

About plugin

  • Plugin page: wc-order-search-a...
  • Plugin version: 1.13.2
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.2-5.5
  • WordPress version: 5.8.1
  • First release: May 19, 2017
  • Latest release: Aug 22, 2020
  • Number of updates: 57
  • Update frequency: every 20.9 days
  • Top authors: rayrutjes (100%)

Code review

53 tests

User reviews

9 reviews

Install metrics

500+ active / 7,957 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼271.18ms] Passed 4 tests

Analyzing server-side resources used by WooCommerce Order Search Admin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.1430.07 ▲10.56
Dashboard /wp-admin3.08 ▲0.0337.04 ▲0.78
Posts /wp-admin/edit.php3.13 ▲0.0337.37 ▼4.44
Add New Post /wp-admin/post-new.php5.44 ▲0.0189.46 ▼1,072.98
Media Library /wp-admin/upload.php3.02 ▲0.0231.60 ▼8.07

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 60 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for WooCommerce Order Search Admin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,659 ▲5316.23 ▲0.729.10 ▲0.7948.13 ▼5.34
Dashboard /wp-admin2,937 ▲845.89 ▼0.08143.41 ▼1.53106.26 ▼2.98
Posts /wp-admin/edit.php2,716 ▲102.69 ▼0.0071.94 ▲0.52100.86 ▲5.35
Add New Post /wp-admin/post-new.php1,659 ▼2,04818.69 ▲3.26362.36 ▼54.19112.56 ▼7.81
Media Library /wp-admin/upload.php1,785 ▲135.01 ▼0.00142.00 ▼13.06102.47 ▼19.52

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

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
The following issues need your attention
  • 10× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Interface 'WC_Order_Search_Admin\\AlgoliaSearch\\FailingHostsCache' not found in wp-content/plugins/wc-order-search-admin/libs/vendor/algolia/algoliasearch-client-php/src/AlgoliaSearch/FileFailingHostsCache.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Order_Search_Admin\\Algolia\\Index\\Index' not found in wp-content/plugins/wc-order-search-admin/includes/class-orders-index.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Order_Search_Admin\\AlgoliaSearch\\Iterators\\AlgoliaIterator' not found in wp-content/plugins/wc-order-search-admin/libs/vendor/algolia/algoliasearch-client-php/src/AlgoliaSearch/Iterators/RuleIterator.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Order_Search_Admin\\AlgoliaSearch\\AlgoliaException' not found in wp-content/plugins/wc-order-search-admin/libs/vendor/algolia/algoliasearch-client-php/src/AlgoliaSearch/AlgoliaConnectionException.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wc-order-search-admin/wc-order-search-admin.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Order_Search_Admin\\AlgoliaSearch\\Iterators\\AlgoliaIterator' not found in wp-content/plugins/wc-order-search-admin/libs/vendor/algolia/algoliasearch-client-php/src/AlgoliaSearch/Iterators/SynonymIterator.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'WC_Order_Search_Admin\\AlgoliaSearch\\FailingHostsCache' not found in wp-content/plugins/wc-order-search-admin/libs/vendor/algolia/algoliasearch-client-php/src/AlgoliaSearch/InMemoryFailingHostsCache.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Order_Search_Admin\\Algolia\\Index\\Index' not found in wp-content/plugins/wc-order-search-admin/libs/vendor/algolia/index/src/SimpleIndex.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/wc-order-search-admin/includes/admin/views/options.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_CLI_Command' not found in wp-content/plugins/wc-order-search-admin/includes/class-commands.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found


Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

wc-order-search-admin/wc-order-search-admin.php 85% from 13 tests

The primary PHP file in "WooCommerce Order Search Admin" version 1.13.2 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.6" instead of "2.2")
  • Domain Path: The domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("/languages.")

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
These items require your attention
  • Do not distribute dangerous files with your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/wc-order-search-admin/libs/vendor/algolia/algoliasearch-client-php/resources/ca-bundle.crt
4,029 lines of code in 54 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity12.94
▷ Minimum class complexity1.00
▷ Maximum class complexity90.00
Average method complexity2.51
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
▷ Abstract classes26.45%
▷ Concrete classes2993.55%
▷ Final classes310.34%
▷ Static methods165.95%
▷ Public methods22483.27%
▷ Protected methods228.18%
▷ Private methods238.55%
▷ Named functions111.11%
▷ Anonymous functions888.89%
▷ Global constants320.00%
▷ Class constants1280.00%
▷ Public constants12100.00%

Plugin size Passed 1 test

Image compression Passed 1 test

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected