90% wpc-name-your-price

Code Review | WPC Name Your Price for WooCommerce

WordPress plugin WPC Name Your Price for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: wpc-name-your-price
  • Plugin version: 2.0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Nov 27, 2019
  • Latest release: Oct 25, 2023
  • Number of updates: 50
  • Update frequency: every 28.6 days
  • Top authors: wpclever (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

2,000+ active /34,683 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.17MB] [CPU: ▼6.83ms] Passed 4 tests

This is a short check of server-side resources used by WPC Name Your Price for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1735.16 ▼3.98
Dashboard /wp-admin3.48 ▲0.1344.70 ▼12.38
Posts /wp-admin/edit.php3.59 ▲0.2349.63 ▲1.85
Add New Post /wp-admin/post-new.php6.08 ▲0.1988.97 ▼9.64
Media Library /wp-admin/upload.php3.40 ▲0.1734.56 ▼1.32
Essential Kit /wp-admin/admin.php?page=wpclever-kit3.3730.49
About /wp-admin/admin.php?page=wpclever3.3732.30

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by WPC Name Your Price for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,866 ▲12014.29 ▼0.141.61 ▼0.1041.92 ▲0.04
Dashboard /wp-admin2,272 ▲955.69 ▲0.0680.67 ▼6.0682.49 ▲44.99
Posts /wp-admin/edit.php2,181 ▲842.00 ▼0.0338.90 ▲2.4734.64 ▼0.38
Add New Post /wp-admin/post-new.php1,610 ▲8418.10 ▼4.88742.16 ▲81.0055.03 ▼11.40
Media Library /wp-admin/upload.php1,474 ▲774.24 ▲0.07100.34 ▼4.8676.83 ▲31.07
Essential Kit /wp-admin/admin.php?page=wpclever-kit5,7412.1634.3854.99
About /wp-admin/admin.php?page=wpclever1,3782.2732.7230.95

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
The SRP test was a success

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)
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes: The official readme.txt might help

wpc-name-your-price/wpc-name-your-price.php Passed 13 tests

"WPC Name Your Price for WooCommerce" version 2.0.8's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
65 characters long description:
WPC Name Your Price lets customers pay with what price they want.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin1,686 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP7151301,046
CSS4816430
JavaScript4384181
SVG10029

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity21.67
▷ Minimum class complexity1.00
▷ Maximum class complexity48.00
Average method complexity3.70
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods46
▷ Static methods1226.09%
▷ Public methods46100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin