84% wpc-product-options

Code Review | WPC Product Options for WooCommerce

WordPress plugin WPC Product Options for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: wpc-product-options
  • Plugin version: 1.5.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4
  • WordPress version: 6.3.1
  • First release: Aug 5, 2022
  • Latest release: Nov 21, 2023
  • Number of updates: 40
  • Update frequency: every 11.8 days
  • Top authors: wpclever (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

800+ active /8,417 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.98ms] Passed 4 tests

This is a short check of server-side resources used by WPC Product Options for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0234.84 ▼2.04
Dashboard /wp-admin3.33 ▲0.0246.46 ▼1.84
Posts /wp-admin/edit.php3.44 ▲0.0846.80 ▼0.05
Add New Post /wp-admin/post-new.php5.93 ▲0.0483.13 ▼11.97
Media Library /wp-admin/upload.php3.25 ▲0.0237.46 ▲5.13
About /wp-admin/admin.php?page=wpclever3.2130.43
Essential Kit /wp-admin/admin.php?page=wpclever-kit3.2137.90

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

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

Browser metrics Passed 4 tests

A check of browser resources used by WPC Product Options for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,867 ▲10514.22 ▼0.491.67 ▼0.0937.12 ▼3.92
Dashboard /wp-admin2,272 ▲955.54 ▲0.0292.76 ▼7.0171.97 ▲28.54
Posts /wp-admin/edit.php2,181 ▲782.00 ▲0.0637.84 ▼6.8834.49 ▼4.08
Add New Post /wp-admin/post-new.php1,605 ▲7924.98 ▲1.43728.19 ▲102.8150.25 ▼3.89
Media Library /wp-admin/upload.php1,474 ▲714.13 ▼0.07102.82 ▲4.5871.35 ▲30.81
About /wp-admin/admin.php?page=wpclever1,4022.2331.3835.43
Essential Kit /wp-admin/admin.php?page=wpclever-kit5,7352.1334.9569.07

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wpc-product-options/wpc-product-options.php:20

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
Please fix the following attributes: Please take inspiration from this readme.txt

wpc-product-options/wpc-product-options.php 92% from 13 tests

This is the main PHP file of "WPC Product Options for WooCommerce" version 1.5.6, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 216 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin7,598 lines of code in 62 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript54841012,764
PHP483592002,381
CSS64221602,011
Sass2751413
SVG10029

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity29.12
▷ Minimum class complexity1.00
▷ Maximum class complexity75.00
Average method complexity3.71
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods83
▷ Static methods1315.66%
▷ Public methods7185.54%
▷ Protected methods00.00%
▷ Private methods1214.46%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants12
▷ Global constants1083.33%
▷ Class constants216.67%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected