83% woocommerce-order-searching

Code Review | WooCommerce Order Search

WordPress plugin WooCommerce Order Search scored83%from 54 tests.

About plugin

  • Plugin page: woocommerce-order...
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.2.1
  • WordPress version: 6.3.1
  • First release: May 14, 2015
  • Latest release: Jul 23, 2016
  • Number of updates: 10
  • Update frequency: every 44.2 days
  • Top authors: ckhandla94 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active /3,446 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼9.26ms] Passed 4 tests

This is a short check of server-side resources used by WooCommerce Order Search
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0636.20 ▼4.37
Dashboard /wp-admin3.37 ▲0.0245.53 ▼17.66
Posts /wp-admin/edit.php3.48 ▲0.1251.06 ▲0.96
Add New Post /wp-admin/post-new.php5.95 ▲0.0691.61 ▼10.99
Media Library /wp-admin/upload.php3.29 ▲0.0634.46 ▼4.02

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

WooCommerce Order Search: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲6114.44 ▲0.051.60 ▼0.1539.22 ▼4.05
Dashboard /wp-admin2,216 ▲284.84 ▼1.06111.88 ▲2.8041.35 ▼5.60
Posts /wp-admin/edit.php2,095 ▲62.01 ▼0.0040.33 ▲3.6836.18 ▼0.19
Add New Post /wp-admin/post-new.php1,540 ▲2623.08 ▲5.64646.32 ▼45.4350.56 ▼8.31
Media Library /wp-admin/upload.php1,398 ▲134.20 ▼0.0397.47 ▼12.0141.65 ▼5.36

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/woocommerce-order-searching/templates/wcos-order-search-form.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woocommerce-order-searching/woo-includes/woo-functions.php:58
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/woocommerce-order-searching/templates/wcos-order-search-page.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/woocommerce-order-searching/woo-includes/wcos-settings.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_user_can_search_order() in wp-content/plugins/woocommerce-order-searching/templates/wcos-order-search-list.php:10

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)
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Plugin Name: Please specify the plugin name on the first line ( === woocommerce-order-searching === )
You can look at the official readme.txt

woocommerce-order-searching/woocommerce-order-search.php 77% from 13 tests

The entry point to "WooCommerce Order Search" version 1.1.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • 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
  • Requires at least: Required version does not match the one declared in readme.txt ("3.0.1" instead of "3.8")
  • Main file name: The principal plugin file should be the same as the plugin slug ("woocommerce-order-searching.php" instead of "woocommerce-order-search.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected735 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP7150111702
PO File15733

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity19.50
▷ Minimum class complexity1.00
▷ Maximum class complexity39.00
Average method complexity3.64
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods28
▷ Static methods1242.86%
▷ Public methods28100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin