84% woo-product-disable

Code Review | Woocommerce Disable Product

WordPress plugin Woocommerce Disable Product scored84%from 54 tests.

About plugin

  • Plugin page: woo-product-disable
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-4.7
  • WordPress version: 6.3.1
  • First release: Aug 2, 2017
  • Latest release: Feb 23, 2018
  • Number of updates: 5
  • Update frequency: every 42.6 days
  • Top authors: purvik (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

100+ active /1,654 total downloads


Plugin footprint 83% from 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.07MB] [CPU: ▼4.81ms] Passed 4 tests

Analyzing server-side resources used by Woocommerce Disable Product
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0842.46 ▼0.09
Dashboard /wp-admin3.38 ▲0.0347.55 ▼16.36
Posts /wp-admin/edit.php3.49 ▲0.1451.58 ▲5.39
Add New Post /wp-admin/post-new.php5.98 ▲0.0999.44 ▼1.92
Media Library /wp-admin/upload.php3.30 ▲0.0738.44 ▼0.87

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

Woocommerce Disable Product: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,931 ▲17013.60 ▼1.049.29 ▲7.3641.79 ▼2.83
Dashboard /wp-admin2,229 ▲295.83 ▼0.18100.03 ▼17.7138.72 ▼0.14
Posts /wp-admin/edit.php2,105 ▲52.00 ▼0.0139.92 ▲2.1736.09 ▼1.99
Add New Post /wp-admin/post-new.php1,534 ▼223.28 ▼0.06653.57 ▲3.5249.35 ▼3.16
Media Library /wp-admin/upload.php1,405 ▲84.25 ▲0.04110.68 ▲0.6548.89 ▲2.55

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • 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 everything seems fine, this is not an exhaustive test

SRP 50% from 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
The following issues need your attention
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/woo-product-disable/admin/partials/woo-product-disable-admin-display.php
    • > /wp-content/plugins/woo-product-disable/public/partials/woo-product-disable-public-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected


Plugin configuration 97% 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
Attributes that need to be fixed: The official readme.txt is a good inspiration

woo-product-disable/woo-product-disable.php Passed 13 tests

This is the main PHP file of "Woocommerce Disable Product" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
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 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin271 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity3.43
▷ Minimum class complexity1.00
▷ Maximum class complexity11.00
Average method complexity1.55
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
▷ Static methods26.45%
▷ Public methods2683.87%
▷ Protected methods00.00%
▷ Private methods516.13%
▷ Named functions6100.00%
▷ Anonymous functions00.00%
▷ 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 files were detected