90% woocommerce-call-for-price

Code Review | Call for Price for WooCommerce

WordPress plugin Call for Price for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: woocommerce-call-...
  • Plugin version: 3.6.0
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.2.2
  • WordPress version: 6.3.1
  • First release: Apr 1, 2013
  • Latest release: Jul 4, 2023
  • Number of updates: 58
  • Update frequency: every 64.6 days
  • Top authors: algoritmika (56.9%)tychesoftwares (44.83%)

Code review

54 tests

User reviews

24 reviews

Install metrics

8,000+ active /92,736 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.01MB] [CPU: ▼12.33ms] Passed 4 tests

Server-side resources used by Call for Price for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0236.77 ▲0.31
Dashboard /wp-admin3.33 ▼0.0244.82 ▼21.43
Posts /wp-admin/edit.php3.38 ▲0.0245.11 ▼3.32
Add New Post /wp-admin/post-new.php5.91 ▲0.0280.27 ▼24.89
Media Library /wp-admin/upload.php3.25 ▲0.0234.62 ▲1.76

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

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

Browser metrics Passed 4 tests

Call for Price for WooCommerce: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.22 ▼1.181.89 ▲0.0542.48 ▼3.46
Dashboard /wp-admin2,209 ▲275.84 ▼0.1996.14 ▼8.1141.75 ▼2.49
Posts /wp-admin/edit.php2,086 ▼32.00 ▲0.0135.07 ▼3.8931.21 ▼4.73
Add New Post /wp-admin/post-new.php1,514 ▼1917.43 ▼5.62693.28 ▲63.8251.39 ▼2.37
Media Library /wp-admin/upload.php1,388 ▼04.23 ▲0.0595.37 ▼4.1842.82 ▲0.60

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

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)
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
3 plugin tags: request a quote, woocommerce, call for price

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

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

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin1,624 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP91646791,334
JavaScript2497210
Markdown313046
YAML21034

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity25.00
▷ Minimum class complexity6.00
▷ Maximum class complexity96.00
Average method complexity3.95
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes112.50%
Methods65
▷ Static methods23.08%
▷ Public methods6498.46%
▷ Protected methods00.00%
▷ Private methods11.54%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin