83% hide-priceless-products

Code Review | Hide Priceless products

WordPress plugin Hide Priceless products scored83%from 54 tests.

About plugin

  • Plugin page: hide-priceless-pr...
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2
  • WordPress version: 6.3.1
  • First release: Feb 19, 2019
  • Latest release: May 17, 2019
  • Number of updates: 24
  • Update frequency: every 3.6 days
  • Top authors: drspock (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /646 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.06MB] [CPU: ▼0.12ms] Passed 4 tests

An overview of server-side resources used by Hide Priceless products
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0441.04 ▲0.72
Dashboard /wp-admin3.37 ▲0.0650.60 ▼1.98
Posts /wp-admin/edit.php3.42 ▲0.0646.25 ▼0.28
Add New Post /wp-admin/post-new.php5.95 ▲0.0694.41 ▲2.70
Media Library /wp-admin/upload.php3.29 ▲0.0635.82 ▲1.06

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Hide Priceless products: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲5914.25 ▼0.351.97 ▲0.3943.33 ▲0.42
Dashboard /wp-admin2,201 ▲275.56 ▲0.0683.82 ▼2.3938.86 ▼1.99
Posts /wp-admin/edit.php2,109 ▲92.00 ▼0.0135.68 ▲1.0232.15 ▼4.07
Add New Post /wp-admin/post-new.php1,532 ▲623.48 ▲0.00602.01 ▼76.5558.64 ▲1.14
Media Library /wp-admin/upload.php1,400 ▼34.18 ▼0.0195.16 ▼4.2641.16 ▼7.78

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
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

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 no errors were found, this is by no means 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
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hide-priceless-products/admin/hide-priceless-products-admin.php:48

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === hide-priceless-products === )
  • Screenshots: A description for screenshot #2 is required in hide-priceless-products/assets to your readme.txt
The official readme.txt is a good inspiration

hide-priceless-products/hide-priceless-products.php 92% from 13 tests

"Hide Priceless products" version 1.1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 151 characters long)

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 plugin773 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP6114117625
PO File32736111
JavaScript16024
CSS13012
Markdown1001

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.44
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%
Functions13
▷ Named functions13100.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
PNG images were not found in this plugin