94% woo-orders-date-range-filter

Code Review | Woo Orders date range filter

WordPress plugin Woo Orders date range filter scored 94% from 54 tests.

About plugin

  • Plugin page: woo-orders-date-r...
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress version: 5.8.1
  • First release: Apr 13, 2017
  • Latest release: Jul 19, 2017
  • Number of updates: 12
  • Update frequency: every 8.3 days
  • Top authors: ukwpexperts (100%)

Code review

54 tests

User reviews

1 review

Install metrics

500+ active / 1,954 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▼0.17MB] [CPU: ▼152.54ms] Passed 4 tests

Analyzing server-side resources used by Woo Orders date range filter
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.90 ▲0.1736.05 ▲15.30
Dashboard /wp-admin2.90 ▼0.1628.35 ▼17.86
Posts /wp-admin/edit.php3.02 ▼0.0932.57 ▼12.51
Add New Post /wp-admin/post-new.php5.03 ▼0.4076.24 ▼563.10
Media Library /wp-admin/upload.php2.99 ▼0.0323.32 ▼16.68

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Woo Orders date range filter: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲4215.80 ▲0.2312.85 ▲1.9346.93 ▲1.13
Dashboard /wp-admin2,970 ▲365.88 ▼0.05131.34 ▼8.66118.57 ▲0.33
Posts /wp-admin/edit.php2,739 ▼02.72 ▲0.0067.63 ▲5.4287.42 ▼4.99
Add New Post /wp-admin/post-new.php1,672 ▼018.88 ▲0.08378.72 ▼1.09115.13 ▲2.79
Media Library /wp-admin/upload.php1,804 ▼65.02 ▼0.03160.23 ▲4.93116.77 ▲1.75

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
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_action() in wp-content/plugins/woo-orders-date-range-filter/woo-orders-date-range-filter.php:231

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
1 plugin tags: woocommerce

woo-orders-date-range-filter/woo-orders-date-range-filter.php 92% from 13 tests

The main PHP script in "Woo Orders date range filter" version 2.0.0 is automatically included on every request by WordPress
Please make the necessary changes and 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

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected2,129 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
CSS334471,095
PHP22621,0631,033
JavaScript1001

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity57.00
▷ Minimum class complexity21.00
▷ Maximum class complexity93.00
Average method complexity1.80
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods140
▷ Static methods2417.14%
▷ Public methods13898.57%
▷ Protected methods21.43%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants18
▷ Global constants316.67%
▷ Class constants1583.33%
▷ Public constants15100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/datepicker-icons-gray.png8.33KB4.17KB▼ 49.88%
images/datepicker-icons.png6.15KB4.17KB▼ 32.13%