83% woo-search-company-for-orders

Code Review | WooCommerce Search Company For Orders

WordPress plugin WooCommerce Search Company For Orders scored83%from 54 tests.

About plugin

  • Plugin page: woo-search-compan...
  • Plugin version: 0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.8
  • WordPress version: 6.3.1
  • First release: Mar 25, 2018
  • Latest release: Oct 25, 2023
  • Number of updates: 8
  • Update frequency: every 255.9 days
  • Top authors: Malaiac (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /530 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼0.14ms] Passed 4 tests

Analyzing server-side resources used by WooCommerce Search Company For Orders
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0135.83 ▼1.86
Dashboard /wp-admin3.32 ▲0.0250.52 ▲5.05
Posts /wp-admin/edit.php3.37 ▲0.0147.43 ▲4.93
Add New Post /wp-admin/post-new.php5.90 ▲0.0190.79 ▼0.84
Media Library /wp-admin/upload.php3.24 ▲0.0134.30 ▼2.78

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

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

Browser metrics Passed 4 tests

WooCommerce Search Company For Orders: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.41 ▲0.131.59 ▼0.1338.57 ▼4.88
Dashboard /wp-admin2,195 ▲185.61 ▲0.00111.80 ▲26.1147.61 ▲8.24
Posts /wp-admin/edit.php2,103 ▲31.99 ▼0.0238.67 ▲0.5334.74 ▲0.47
Add New Post /wp-admin/post-new.php1,535 ▼918.29 ▲0.04628.81 ▼2.6470.10 ▲9.77
Media Library /wp-admin/upload.php1,400 ▲34.23 ▲0.0194.04 ▼16.1239.86 ▼6.37

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/woo-search-company-for-orders/woocommerce-search-company.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% 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
Please fix the following attributes:
  • Screenshots: Add an image for screenshot #1 (Extend the customer search on the Add/Edit Order page)
  • Contributors: Plugin contributors not specified
You can take inspiration from this readme.txt

woo-search-company-for-orders/woocommerce-search-company.php 77% from 13 tests

"WooCommerce Search Company For Orders" version 0.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("woo-search-company-for-orders.php" instead of "woocommerce-search-company.php")
  • Text Domain: The text domain should only use lowercase characters and dashes
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.4" instead of "4.0")

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
There were no executable files found in this plugin61 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1193361

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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.02MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png25.00KB24.14KB▼ 3.42%