99% filter-featured-products

Code Review | Filter Featured for WooCommerce

WordPress plugin Filter Featured for WooCommerce scored 99% from 54 tests.

About plugin

  • Plugin page: filter-featured-p...
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-5.7.2
  • WordPress version: 5.8.1
  • First release: May 24, 2021
  • Latest release: May 25, 2021
  • Number of updates: 13
  • Update frequency: every 0.2 days
  • Top authors: backpackstudio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active / 242 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼146.05ms] Passed 4 tests

Analyzing server-side resources used by Filter Featured for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0026.30 ▼12.35
Dashboard /wp-admin3.06 ▲0.0147.01 ▲0.66
Posts /wp-admin/edit.php3.11 ▼0.0047.99 ▼5.51
Add New Post /wp-admin/post-new.php5.42 ▼0.0192.04 ▼564.93
Media Library /wp-admin/upload.php3.00 ▲0.0032.99 ▼1.41

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Filter Featured for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,715 ▲6816.25 ▲0.387.84 ▼1.8749.61 ▼4.21
Dashboard /wp-admin3,002 ▲716.10 ▲0.15152.15 ▼11.74124.48 ▲0.28
Posts /wp-admin/edit.php2,752 ▲132.70 ▲0.0071.69 ▲2.8995.59 ▲0.07
Add New Post /wp-admin/post-new.php1,508 ▼17518.57 ▼0.27376.06 ▼24.21116.92 ▼0.04
Media Library /wp-admin/upload.php1,820 ▲135.00 ▼0.01165.89 ▲12.80120.08 ▼4.77

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstall script ran successfully

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% 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
2 plugin tags: woocommerce, filter

filter-featured-products/filter-featured.php 77% from 13 tests

The main PHP script in "Filter Featured for WooCommerce" version 1.0.1 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
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("filter-featured-products.php" instead of "filter-featured.php")
  • Domain Path: The domain path folder was not found ("/i18n/languages")

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 plugin102 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP31410098
Markdown1304

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods480.00%
▷ Public methods360.00%
▷ Protected methods00.00%
▷ Private methods240.00%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.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
No PNG files were detected