83% zwk-order-filter

Code Review | Zwk Order Filter

WordPress plugin Zwk Order Filter scored83%from 54 tests.

About plugin

  • Plugin page: zwk-order-filter
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.8.1
  • WordPress version: 6.3.1
  • First release: Nov 1, 2021
  • Latest release: Nov 1, 2021
  • Number of updates: 4
  • Update frequency: every 3.3 days
  • Top authors: zworthkey (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /331 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.00MB] [CPU: ▼6.27ms] Passed 4 tests

Server-side resources used by Zwk Order Filter
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0139.42 ▼2.17
Dashboard /wp-admin3.31 ▲0.0043.34 ▼3.59
Posts /wp-admin/edit.php3.36 ▲0.0042.92 ▼3.72
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.12 ▼15.60
Media Library /wp-admin/upload.php3.23 ▲0.0036.47 ▲7.14

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Zwk Order Filter
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲7113.25 ▼1.144.58 ▲2.7943.59 ▼6.68
Dashboard /wp-admin2,209 ▲215.79 ▲0.74100.96 ▼3.9339.96 ▼1.75
Posts /wp-admin/edit.php2,094 ▲52.02 ▼0.0034.58 ▼6.7534.01 ▼3.23
Add New Post /wp-admin/post-new.php1,539 ▼623.01 ▲4.67660.91 ▲57.6855.41 ▲5.62
Media Library /wp-admin/upload.php1,394 ▲34.22 ▲0.02110.16 ▲13.5847.32 ▲4.38

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for 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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/zwk-order-filter/public/partials/zwk-order-filter-public-display.php
    • > /wp-content/plugins/zwk-order-filter/admin/partials/zwk-order-filter-admin-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 81% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (Settings), #2 (Order), #3 (Additional Filter)
  • Plugin Name: You should set the name of your plugin on the first line ( === zwk-order-filter === )
  • Donate link: Invalid URI ("zworthkey.com")
The official readme.txt might help

zwk-order-filter/zwk-order-filter.php Passed 13 tests

"Zwk Order Filter" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
96 characters long description:
This is a short description of what the plugin does. It's displayed in the WordPress admin area.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected639 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP13156578477
CSS238134
JavaScript275428

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity8.00
▷ Minimum class complexity1.00
▷ Maximum class complexity50.00
Average method complexity2.65
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods34
▷ Static methods25.88%
▷ Public methods2985.29%
▷ Protected methods00.00%
▷ Private methods514.71%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin