83% wc-filter-orders-by-payment-method-in-admin-order-list

Code Review | Filter Orders by Payment Method for WooCommerce

WordPress plugin Filter Orders by Payment Method for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: wc-filter-orders-...
  • Plugin version: 1.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2+
  • WordPress version: 6.3.1
  • First release: Jul 8, 2020
  • Latest release: Jul 8, 2020
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: deomandeo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /603 total downloads

Benchmarks

Plugin footprint 83% 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: ▲0.02MB] [CPU: ▼4.32ms] Passed 4 tests

An overview of server-side resources used by Filter Orders by Payment Method for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0247.86 ▲4.73
Dashboard /wp-admin3.32 ▲0.0247.93 ▼4.24
Posts /wp-admin/edit.php3.37 ▲0.0246.88 ▼4.87
Add New Post /wp-admin/post-new.php5.90 ▲0.02102.07 ▼3.04
Media Library /wp-admin/upload.php3.24 ▲0.0131.78 ▼5.12

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Filter Orders by Payment Method for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.72 ▲0.482.40 ▲0.8251.11 ▲10.04
Dashboard /wp-admin2,195 ▲215.54 ▼0.0388.33 ▲1.6839.43 ▼4.81
Posts /wp-admin/edit.php2,100 ▲31.97 ▲0.0235.37 ▼2.7934.72 ▼3.31
Add New Post /wp-admin/post-new.php1,526 ▼923.02 ▲4.75606.05 ▼29.2545.00 ▼17.24
Media Library /wp-admin/upload.php1,400 ▼04.21 ▲0.07100.92 ▼2.3543.18 ▼3.07

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wc-filter-orders-by-payment-method-in-admin-order-list/main.php:26

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 81% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention: Please take inspiration from this readme.txt

wc-filter-orders-by-payment-method-in-admin-order-list/main.php 85% from 13 tests

The main PHP file in "Filter Orders by Payment Method for WooCommerce" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wc-filter-orders-by-payment-method-in-admin-order-list.php" instead of "main.php")

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 plugin59 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1101559

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.48
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin