78% product-call-for-price-for-woocommerce

Code Review | Product for Price for WooCommerce

WordPress plugin Product for Price for WooCommerce scored78%from 54 tests.

About plugin

  • Plugin page: product-call-for-...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.1.1
  • WordPress version: 6.3.1
  • First release: Nov 11, 2022
  • Latest release: May 19, 2023
  • Number of updates: 5
  • Update frequency: every 37.8 days
  • Top authors: howdytheme (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /144 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.00MB] [CPU: ▼6.10ms] Passed 4 tests

An overview of server-side resources used by Product for Price for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.83 ▼2.98
Dashboard /wp-admin3.31 ▲0.0146.71 ▼2.16
Posts /wp-admin/edit.php3.36 ▲0.0146.63 ▼0.44
Add New Post /wp-admin/post-new.php5.89 ▲0.0179.78 ▼18.52
Media Library /wp-admin/upload.php3.23 ▲0.0134.80 ▼0.74

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Product for Price for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲6813.25 ▼1.121.78 ▼0.4339.89 ▼5.65
Dashboard /wp-admin2,220 ▲324.87 ▼0.00114.61 ▲3.9441.88 ▼3.70
Posts /wp-admin/edit.php2,100 ▲112.02 ▲0.0236.69 ▲1.4336.57 ▲4.87
Add New Post /wp-admin/post-new.php1,540 ▲2623.26 ▲5.78632.39 ▼47.3247.80 ▼8.92
Media Library /wp-admin/upload.php1,399 ▲114.17 ▼0.2094.41 ▼15.7141.32 ▼7.72

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
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/product-call-for-price-for-woocommerce/product-call-for-price-for-woocommerce.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/product-call-for-price-for-woocommerce/inc/pcfpw_backend.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/product-call-for-price-for-woocommerce/inc/pcfpw_fronted.php:105

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% 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
Please fix the following attributes: The official readme.txt might help

product-call-for-price-for-woocommerce/product-call-for-price-for-woocommerce.php Passed 13 tests

This is the main PHP file of "Product for Price for WooCommerce" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
78 characters long description:
This plugin replace Call for Price when price field for product is left empty.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin243 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP32518233
CSS10010

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin