90% woocommerce-hide-password-protected-products

Code Review | WooCommerce Hide Password Protected Products

WordPress plugin WooCommerce Hide Password Protected Products scored90%from 54 tests.

About plugin

  • Plugin page: woocommerce-hide-...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.0
  • WordPress version: 6.3.1
  • First release: Sep 19, 2014
  • Latest release: Sep 19, 2014
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: barrykooij (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,595 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.02ms] Passed 4 tests

Server-side resources used by WooCommerce Hide Password Protected Products
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.94 ▼1.45
Dashboard /wp-admin3.31 ▲0.0143.97 ▼8.84
Posts /wp-admin/edit.php3.36 ▲0.0150.85 ▲6.07
Add New Post /wp-admin/post-new.php5.89 ▲0.0184.04 ▼13.89
Media Library /wp-admin/upload.php3.24 ▲0.0137.06 ▲4.11

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for WooCommerce Hide Password Protected Products
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7914.42 ▲0.041.93 ▼0.1740.37 ▼1.58
Dashboard /wp-admin2,206 ▲184.87 ▼0.0498.43 ▼11.4138.56 ▼2.58
Posts /wp-admin/edit.php2,092 ▲32.05 ▲0.0239.21 ▲3.2934.23 ▼0.79
Add New Post /wp-admin/post-new.php1,533 ▼1223.05 ▲5.04674.54 ▲52.9252.20 ▼3.06
Media Library /wp-admin/upload.php1,388 ▼34.21 ▼0.01103.06 ▲1.4445.12 ▲3.30

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
1 plugin tags: woocommerce

woocommerce-hide-password-protected-products/woocommerce-hide-password-protected-products.php Passed 13 tests

The main file in "WooCommerce Hide Password Protected Products" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
61 characters long description:
Hide password protected products from appearing in the loops.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected23 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1124023

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.75
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin