89% non-purchasable-woocommerce-products

Code Review | Non-Purchasable WooCommerce Products

WordPress plugin Non-Purchasable WooCommerce Products scored 89% from 54 tests.

About plugin

  • Plugin page: non-purchasable-w...
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-5.7
  • WordPress version: 6.3.1
  • First release: Feb 6, 2018
  • Latest release: Jun 2, 2021
  • Number of updates: 18
  • Update frequency: every 67.3 days
  • Top authors: GuyPrimavera (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

1,000+ active / 7,295 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by Non-Purchasable WooCommerce Products
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.13 ▲0.17
Dashboard /wp-admin3.31 ▲0.0046.24 ▲0.26
Posts /wp-admin/edit.php3.36 ▲0.0048.36 ▲0.35
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.92 ▼14.38
Media Library /wp-admin/upload.php3.23 ▲0.0034.49 ▲2.14

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: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Non-Purchasable WooCommerce Products
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.34 ▼0.951.59 ▼0.1740.25 ▼4.79
Dashboard /wp-admin2,206 ▲185.85 ▼0.05105.10 ▼4.0741.90 ▼0.87
Posts /wp-admin/edit.php2,089 ▼32.01 ▼0.0534.53 ▼5.6033.67 ▼2.43
Add New Post /wp-admin/post-new.php1,514 ▼2817.72 ▼0.54685.50 ▲47.7756.49 ▲4.22
Media Library /wp-admin/upload.php1,388 ▲64.19 ▼0.0794.54 ▼5.3541.66 ▼1.47

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • 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)
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Tags: Too many tags (16 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

non-purchasable-woocommerce-products/non-purchasable-woocommerce-products.php 92% from 13 tests

"Non-Purchasable WooCommerce Products" version 1.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Requires at least: Required version must match the one declared in readme.txt ("3.0.1" instead of "3.0.0")

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
There were no executable files found in this plugin237 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP54431201
Markdown113024
CSS1006
Sass1106

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.43
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%
Functions20
▷ Named functions20100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin