89% product-options-for-woocommerce

Code Review | Simple Product Options for WooCommerce

WordPress plugin Simple Product Options for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: product-options-f...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.3
  • WordPress version: 6.3.1
  • First release: Jun 12, 2018
  • Latest release: Aug 20, 2023
  • Number of updates: 27
  • Update frequency: every 70.2 days
  • Top authors: pektsekye (100%)

Code review

54 tests

User reviews

30 reviews

Install metrics

5,000+ active /25,751 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.12ms] Passed 4 tests

A check of server-side resources used by Simple Product Options for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.38 ▼2.55
Dashboard /wp-admin3.31 ▲0.0050.84 ▼2.73
Posts /wp-admin/edit.php3.36 ▲0.0050.18 ▲1.47
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.62 ▼12.66
Media Library /wp-admin/upload.php3.23 ▲0.0040.95 ▲4.97

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Simple Product Options for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.27 ▼0.371.87 ▼0.2144.07 ▼4.98
Dashboard /wp-admin2,195 ▲185.55 ▼0.1289.02 ▼9.8237.09 ▼6.37
Posts /wp-admin/edit.php2,100 ▼01.97 ▼0.0438.57 ▲0.8235.10 ▼1.58
Add New Post /wp-admin/post-new.php1,526 ▼223.41 ▲0.25677.78 ▼3.2352.12 ▼4.27
Media Library /wp-admin/upload.php1,400 ▼04.17 ▼0.0597.50 ▼2.0740.67 ▼4.37

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however 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 | 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

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: price calculation formula, lenses prescription, customer order note, dependent variations

product-options-for-woocommerce/product-options-for-woocommerce.php 85% from 13 tests

Analyzing the main PHP file in "Simple Product Options for WooCommerce" version 1.0.0
Please take the time to fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/i18n/languages")
  • Description: Please don't use more than 140 characters for the plugin description (currently 143 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected1,286 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP1326320881
JavaScript2660248
CSS3260157

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity14.44
▷ Minimum class complexity1.00
▷ Maximum class complexity51.00
Average method complexity2.98
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes111.11%
Methods61
▷ Static methods46.56%
▷ Public methods5793.44%
▷ Protected methods00.00%
▷ Private methods46.56%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin