10% woo-product-request

Code Review | WooCommerce Product Request

WordPress plugin WooCommerce Product Request scored10%from 54 tests.

About plugin

  • Plugin page: woo-product-request
  • Plugin version: 0.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.8
  • WordPress version: 6.3.1
  • First release: Sep 25, 2017
  • Latest release: Sep 28, 2017
  • Number of updates: 9
  • Update frequency: every 0.4 days
  • Top authors: skochwm (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /851 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/woo-product-request/classes/class.form.php+26
    Trying to access array offset on value of type bool

Server metrics [RAM: ▲0.12MB] [CPU: ▼8.46ms] Passed 4 tests

Server-side resources used by WooCommerce Product Request
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1443.76 ▼0.72
Dashboard /wp-admin3.43 ▲0.1252.44 ▼16.25
Posts /wp-admin/edit.php3.54 ▲0.1853.37 ▼7.80
Add New Post /wp-admin/post-new.php6.01 ▲0.1296.19 ▼9.07
Media Library /wp-admin/upload.php3.35 ▲0.1240.67 ▲0.47
Product Request /wp-admin/admin.php?page=product-request3.2937.62
All Requests /wp-admin/edit.php?post_type=wbl_product_request3.3942.76
Add New /wp-admin/post-new.php?post_type=wbl_product_request3.4654.53

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by WooCommerce Product Request
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,835 ▲7414.22 ▼0.051.98 ▲0.1541.42 ▼11.39
Dashboard /wp-admin2,238 ▲585.57 ▼0.0585.89 ▼3.9243.53 ▼2.90
Posts /wp-admin/edit.php2,144 ▲442.08 ▲0.0642.03 ▲5.8639.85 ▲3.11
Add New Post /wp-admin/post-new.php1,560 ▲3417.63 ▲0.05590.47 ▼40.6052.85 ▼10.59
Media Library /wp-admin/upload.php1,440 ▲404.26 ▼0.05101.48 ▼9.9243.48 ▼2.71
Product Request /wp-admin/admin.php?page=product-request1,2022.3031.8739.15
All Requests /wp-admin/edit.php?post_type=wbl_product_request1,1171.9735.2131.84
Add New /wp-admin/post-new.php?post_type=wbl_product_request2,2147.65170.6062.50

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
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=product-request
    • > Notice in wp-content/plugins/woo-product-request/classes/class.settings-page.php+144
    Undefined index: button_position

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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
3 plugin tags: woocommerce, cart, quick buy

woo-product-request/woocommerce-product-request.php 85% from 13 tests

"WooCommerce Product Request" version 0.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("woo-product-request.php" instead of "woocommerce-product-request.php")

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
Success! There were no dangerous files found in this plugin1,531 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
CSS2311658
PHP5207227527
SVG342213
JavaScript110668
PO File1252565

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity9.00
▷ Minimum class complexity1.00
▷ Maximum class complexity15.00
Average method complexity2.77
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods23
▷ Static methods417.39%
▷ Public methods23100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants5
▷ Global constants5100.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
No PNG images were found in this plugin