89% hides-product-variations-without-stock

Code Review | Hides product variations without stock

WordPress plugin Hides product variations without stock scored 89% from 54 tests.

About plugin

  • Plugin page: hides-product-var...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-5.4.0
  • WordPress version: 6.3.1
  • First release: Aug 12, 2020
  • Latest release: Aug 12, 2020
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: felipe152 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 645 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
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼7.07ms] Passed 4 tests

This is a short check of server-side resources used by Hides product variations without stock
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.32 ▼9.46
Dashboard /wp-admin3.32 ▲0.0245.09 ▼3.31
Posts /wp-admin/edit.php3.37 ▲0.0250.34 ▲5.80
Add New Post /wp-admin/post-new.php5.90 ▲0.0283.86 ▼12.98
Media Library /wp-admin/upload.php3.24 ▲0.0133.24 ▼2.53

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Hides product variations without stock
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.62 ▲0.221.72 ▼0.2039.33 ▼5.10
Dashboard /wp-admin2,206 ▲175.80 ▲0.8197.30 ▼15.6739.55 ▼1.45
Posts /wp-admin/edit.php2,089 ▼32.00 ▼0.0335.96 ▼2.1531.61 ▼0.77
Add New Post /wp-admin/post-new.php1,533 ▲1223.31 ▲0.08666.38 ▼21.8353.93 ▼5.67
Media Library /wp-admin/upload.php1,388 ▲34.21 ▲0.0195.06 ▼22.3045.07 ▼5.02

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === hides-product-variations-without-stock === )
You can look at the official readme.txt

hides-product-variations-without-stock/remove-variant.php 92% from 13 tests

"Hides product variations without stock" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("hides-product-variations-without-stock.php" instead of "remove-variant.php")

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
No dangerous file extensions were detected84 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP213884

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.59
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%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
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
No PNG images were found in this plugin