89% jcwp-add-quote-button-in-product-page

Code Review | JCWP Add Quote button in product page

WordPress plugin JCWP Add Quote button in product page scored89%from 54 tests.

About plugin

  • Plugin page: jcwp-add-quote-bu...
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1
  • WordPress version: 6.3.1
  • First release: Jan 31, 2023
  • Latest release: Sep 12, 2023
  • Number of updates: 5
  • Update frequency: every 44.6 days
  • Top authors: jcwpplugins (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /325 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

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

An overview of server-side resources used by JCWP Add Quote button in product page
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0352.78 ▲14.01
Dashboard /wp-admin3.32 ▲0.0244.17 ▼1.95
Posts /wp-admin/edit.php3.37 ▲0.0248.46 ▼1.86
Add New Post /wp-admin/post-new.php5.90 ▲0.0290.49 ▼9.18
Media Library /wp-admin/upload.php3.24 ▲0.0133.87 ▲0.92
Quote button Configuration /wp-admin/options-general.php?page=jcwp-quote-button-in-product-page3.2133.39

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for JCWP Add Quote button in product page
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6013.23 ▼1.151.73 ▲0.0138.53 ▼6.20
Dashboard /wp-admin2,210 ▲225.85 ▲0.95107.52 ▲0.0438.73 ▼3.87
Posts /wp-admin/edit.php2,096 ▲71.99 ▼0.0542.09 ▲0.7134.72 ▼0.98
Add New Post /wp-admin/post-new.php1,536 ▲1723.04 ▼0.14666.39 ▲48.5570.07 ▲17.42
Media Library /wp-admin/upload.php1,392 ▲44.31 ▲0.0495.45 ▲0.6541.90 ▲2.88
Quote button Configuration /wp-admin/options-general.php?page=jcwp-quote-button-in-product-page8682.0322.2327.27

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
Congratulations! This plugin passed the SRP test

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 errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: quote button, woocommerce, whatsapp

jcwp-add-quote-button-in-product-page/jcwp-add-quote-button-in-product-page.php 92% from 13 tests

"JCWP Add Quote button in product page" version 1.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin156 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP21715154
CSS1002

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity1.88
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
10 PNG files occupy 0.95MB with 0.52MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-128x128.png4.62KB2.10KB▼ 54.65%
assets/screenshot-2.png300.52KB76.76KB▼ 74.46%
assets/banner-772x250-assets/banner-772x250.png123.99KB64.03KB▼ 48.36%
assets/screenshot-3.png125.47KB36.71KB▼ 70.75%
img/jcwp-quote-icon.png3.06KB2.22KB▼ 27.33%