72% woo-product-options

Code Review | Woo Product Options

WordPress plugin Woo Product Options scored72%from 54 tests.

About plugin

  • Plugin page: woo-product-options
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.8
  • WordPress version: 6.3.1
  • First release: Aug 6, 2018
  • Latest release: Aug 16, 2018
  • Number of updates: 5
  • Update frequency: every 2.0 days
  • Top authors: mithublue (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /961 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.31MB] [CPU: ▼6.64ms] Passed 4 tests

A check of server-side resources used by Woo Product Options
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.85 ▲0.3841.24 ▲5.38
Dashboard /wp-admin3.68 ▲0.3445.21 ▼18.19
Posts /wp-admin/edit.php3.67 ▲0.311,366.11 ▲1,321.23
Add New Post /wp-admin/post-new.php6.19 ▲0.3081.92 ▼12.71
Media Library /wp-admin/upload.php3.54 ▲0.3135.56 ▼1.03
Woo Product Options /wp-admin/edit.php?post_type=product&page=woopo3.3724.63

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 59 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Woo Product Options
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,046 ▲30015.65 ▲1.2733.82 ▲32.0842.42 ▲4.96
Dashboard /wp-admin2,397 ▲2055.86 ▲0.8695.53 ▼8.9138.55 ▼1.51
Posts /wp-admin/edit.php2,278 ▲1892.00 ▼0.0135.31 ▲1.1632.09 ▼1.09
Add New Post /wp-admin/post-new.php1,720 ▲19223.39 ▲5.18645.09 ▲29.3557.37 ▼1.46
Media Library /wp-admin/upload.php1,580 ▲1924.23 ▲0.04103.72 ▼9.7645.42 ▼5.00
News /wp-admin/edit.php?post_type=product&page=woopo#/cc-news280.440.073.81
Help /wp-admin/edit.php?post_type=product&page=woopo#/help280.440.103.85
Woo Product Options /wp-admin/edit.php?post_type=product&page=woopo280.440.083.58
Product Options Settings /wp-admin/edit.php?post_type=product&page=woopo#/settings280.440.093.87
Upgrage Woo Product Options /wp-admin/edit.php?post_type=product&page=woopo#/get-pro280.440.093.46

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 0% 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
The following issues need your attention
  • 4× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/woo-product-options/templates/form-items.php
    • > /wp-content/plugins/woo-product-options/templates/core/form-builder.php
    • > /wp-content/plugins/woo-product-options/templates/edit-form.php
    • > /wp-content/plugins/woo-product-options/data.php
  • 18× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_types() in wp-content/plugins/woo-product-options/form-type-data.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Woopo_Functions' not found in wp-content/plugins/woo-product-options/templates/form-types.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/woo-product-options/admin-product-single.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-product-options/form-builder-admin.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_statuses() in wp-content/plugins/woo-product-options/templates/forms.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/woo-product-options/templates/promo-get-pro.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/woo-product-options/templates/form.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-product-options/woopo-applications.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/woo-product-options/templates/help.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-product-options/public-single-product.php:9

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
These are user-side errors you should fix
    • > GET request to /wp-admin/edit.php?post_type=product&page=woopo#/cc-news
    • > Network (severe)
    wp-admin/edit.php?post_type=product&page=woopo#/cc-news - Failed to load resource: the server responded with a status of 403 (Forbidden)
    • > GET request to /wp-admin/edit.php?post_type=product&page=woopo#/help
    • > Network (severe)
    wp-admin/edit.php?post_type=product&page=woopo#/help - Failed to load resource: the server responded with a status of 403 (Forbidden)
    • > GET request to /wp-admin/edit.php?post_type=product&page=woopo
    • > Network (severe)
    wp-admin/edit.php?post_type=product&page=woopo - Failed to load resource: the server responded with a status of 403 (Forbidden)
    • > GET request to /wp-admin/edit.php?post_type=product&page=woopo#/settings
    • > Network (severe)
    wp-admin/edit.php?post_type=product&page=woopo#/settings - Failed to load resource: the server responded with a status of 403 (Forbidden)
    • > GET request to /wp-admin/edit.php?post_type=product&page=woopo#/get-pro
    • > Network (severe)
    wp-admin/edit.php?post_type=product&page=woopo#/get-pro - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots lack descriptions #6, #7 in woo-product-options/assets to your readme.txt
  • Tags: Please reduce the number of tags, currently 60 tag instead of maximum 10
You can look at the official readme.txt

woo-product-options/woo-product-options.php 85% from 13 tests

The main file in "Woo Product Options" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Domain Path: The domain path folder was not found ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin23,737 lines of code in 52 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript201,3181,55611,742
JSON2006,201
PHP253432523,257
CSS32502,098
LESS11420438
Markdown1001

PHP code Passed 2 tests

This is a very shot review of 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 complexity14.00
▷ Minimum class complexity2.00
▷ Maximum class complexity43.00
Average method complexity2.73
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits1
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods90
▷ Static methods3437.78%
▷ Public methods90100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
There were not PNG files found in your plugin