89% ni-order-filter-for-woocommerce

Code Review | Ni Order Filter For WooCommerce

WordPress plugin Ni Order Filter For WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: ni-order-filter-f...
  • Plugin version: 1.0.6
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.4.1
  • WordPress version: 6.3.1
  • First release: Jul 9, 2021
  • Latest release: Nov 26, 2023
  • Number of updates: 13
  • Update frequency: every 67.0 days
  • Top authors: anzia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,169 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.00MB] [CPU: ▼4.79ms] Passed 4 tests

A check of server-side resources used by Ni Order Filter For WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.83 ▼2.98
Dashboard /wp-admin3.32 ▼0.0244.69 ▼17.47
Posts /wp-admin/edit.php3.37 ▲0.0147.79 ▲1.24
Add New Post /wp-admin/post-new.php5.90 ▲0.0190.57 ▲0.22
Media Library /wp-admin/upload.php3.24 ▲0.0132.45 ▲1.07

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Ni Order Filter For WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲4314.32 ▲0.161.87 ▼0.0839.30 ▼5.85
Dashboard /wp-admin2,195 ▲285.62 ▲0.0194.57 ▼7.2444.15 ▼1.53
Posts /wp-admin/edit.php2,101 ▲11.94 ▼0.0739.05 ▲1.5433.86 ▼0.54
Add New Post /wp-admin/post-new.php1,596 ▲7023.29 ▼0.31607.65 ▼66.4028.31 ▼23.35
Media Library /wp-admin/upload.php1,400 ▼04.27 ▲0.0797.26 ▼4.7542.86 ▼2.03

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

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 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Screenshots: Add an image for screenshot #1 (Dashboard shows country map and key country sale indicator)
You can take inspiration from this readme.txt

ni-order-filter-for-woocommerce/ni-order-filter-for-woocommerce.php 85% from 13 tests

The primary PHP file in "Ni Order Filter For WooCommerce" version 1.0.6 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/languages/")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected393 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP7180234384
HTML1109

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity9.00
▷ Minimum class complexity1.00
▷ Maximum class complexity13.00
Average method complexity2.81
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods31
▷ Static methods00.00%
▷ Public methods31100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png18.25KB8.41KB▼ 53.89%