89% product-open-pricing-name-your-price-for-woocommerce

Code Review | Product Open Pricing (Name Your Price) for WooCommerce

WordPress plugin Product Open Pricing (Name Your Price) for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: product-open-pric...
  • Plugin version: 1.7.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.2
  • WordPress version: 6.3.1
  • First release: Jan 29, 2017
  • Latest release: Jul 14, 2023
  • Number of updates: 65
  • Update frequency: every 36.2 days
  • Top authors: algoritmika (53.85%)wpwham (47.69%)

Code review

54 tests

User reviews

16 reviews

Install metrics

8,000+ active /85,916 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼9.38ms] Passed 4 tests

An overview of server-side resources used by Product Open Pricing (Name Your Price) for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0235.96 ▼2.33
Dashboard /wp-admin3.33 ▲0.0253.59 ▼4.62
Posts /wp-admin/edit.php3.38 ▲0.0248.97 ▼3.92
Add New Post /wp-admin/post-new.php5.91 ▲0.0291.77 ▼26.63
Media Library /wp-admin/upload.php3.25 ▲0.0241.70 ▲4.40

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Product Open Pricing (Name Your Price) for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.24 ▼0.141.73 ▼0.2840.51 ▲3.19
Dashboard /wp-admin2,195 ▲185.54 ▼0.1187.56 ▼1.5638.78 ▼8.12
Posts /wp-admin/edit.php2,100 ▲32.01 ▼0.0138.82 ▲1.4936.36 ▼3.62
Add New Post /wp-admin/post-new.php1,526 ▼023.04 ▼0.59690.94 ▲21.4353.21 ▲0.55
Media Library /wp-admin/upload.php1,400 ▼34.20 ▲0.01104.18 ▼1.5846.93 ▲1.16

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests Passed 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 Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
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 just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: woocommerce, product open pricing, open pricing, name your price

product-open-pricing-name-your-price-for-woocommerce/product-open-pricing-for-woocommerce.php 85% from 13 tests

Analyzing the main PHP file in "Product Open Pricing (Name Your Price) for WooCommerce" version 1.7.1
Please make the necessary changes and fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("product-open-pricing-name-your-price-for-woocommerce.php" instead of "product-open-pricing-for-woocommerce.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin1,155 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP61894991,124
JavaScript15631

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity26.67
▷ Minimum class complexity1.00
▷ Maximum class complexity102.00
Average method complexity3.80
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes116.67%
Methods55
▷ Static methods35.45%
▷ Public methods55100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
There were not PNG files found in your plugin