83% woo-custom-product-call-for-price

Code Review | woocommerce-custom-product-call-for-price

WordPress plugin woocommerce-custom-product-call-for-price scored 83% from 54 tests.

About plugin

  • Plugin page: woo-custom-produc...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.9.4
  • WordPress version: 6.3.1
  • First release: Apr 28, 2018
  • Latest release: Apr 28, 2018
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: logicrays (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 622 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.01MB] [CPU: ▼7.42ms] Passed 4 tests

An overview of server-side resources used by woocommerce-custom-product-call-for-price
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0136.58 ▼10.67
Dashboard /wp-admin3.32 ▲0.0245.35 ▼1.62
Posts /wp-admin/edit.php3.37 ▲0.0246.11 ▼3.05
Add New Post /wp-admin/post-new.php5.90 ▲0.0285.85 ▼14.33
Media Library /wp-admin/upload.php3.24 ▲0.0134.22 ▼1.61

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for woocommerce-custom-product-call-for-price
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲7514.45 ▼0.191.67 ▼0.4938.20 ▼4.00
Dashboard /wp-admin2,213 ▲255.83 ▲0.74114.45 ▲5.3841.79 ▼2.45
Posts /wp-admin/edit.php2,106 ▲172.05 ▲0.0539.81 ▼1.1840.79 ▲4.20
Add New Post /wp-admin/post-new.php1,422 ▼11521.74 ▲3.59550.15 ▼56.9130.46 ▼23.08
Media Library /wp-admin/upload.php1,395 ▲104.22 ▼0.0594.81 ▼0.4738.68 ▼4.24

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

Smoke tests 75% from 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 no errors were found, this is by no means an exhaustive test

SRP 50% from 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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/woo-custom-product-call-for-price/wooommerce-custom-product-call-for-price.php:11

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% 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
Attributes that need to be fixed:
  • Donate link: Invalid url: ""
  • Stable tag: No value
  • Screenshots: These screenshots require images: #1 (screenshot-1.png), #2 (screenshot-2.png), #3 (screenshot-3.png), #4 (screenshot-4.png)
The official readme.txt is a good inspiration

woo-custom-product-call-for-price/wooommerce-custom-product-call-for-price.php 92% from 13 tests

"woocommerce-custom-product-call-for-price" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("woo-custom-product-call-for-price.php" instead of "wooommerce-custom-product-call-for-price.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin333 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript2021160
PHP21416121
CSS11352

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods1
▷ Static methods00.00%
▷ Public methods1100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
4 PNG files occupy 0.25MB with 0.14MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png20.07KB7.69KB▼ 61.66%
screenshot-1.png69.56KB37.33KB▼ 46.34%
screenshot-2.png26.84KB10.85KB▼ 59.58%
screenshot-4.png142.19KB65.01KB▼ 54.28%