89% software-sales-prices

Code Review | WooCommerce Extra Product Options AddOns

WordPress plugin WooCommerce Extra Product Options AddOns scored89%from 54 tests.

About plugin

  • Plugin page: software-sales-pr...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.5
  • WordPress version: 6.3.1
  • First release: Dec 20, 2019
  • Latest release: Aug 19, 2020
  • Number of updates: 12
  • Update frequency: every 20.3 days
  • Top authors: planetwebzone (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

70+ active /1,735 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

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

Server-side resources used by WooCommerce Extra Product Options AddOns
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0034.85 ▼3.77
Dashboard /wp-admin3.31 ▲0.0045.48 ▼3.60
Posts /wp-admin/edit.php3.36 ▲0.0046.08 ▼0.52
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.80 ▼8.49
Media Library /wp-admin/upload.php3.23 ▲0.0034.41 ▲0.50

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by WooCommerce Extra Product Options AddOns
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▲0.071.69 ▲0.1237.05 ▼3.99
Dashboard /wp-admin2,198 ▲245.58 ▲0.0592.13 ▲6.0738.48 ▼4.98
Posts /wp-admin/edit.php2,103 ▲31.97 ▼0.0138.72 ▼2.6237.77 ▲5.99
Add New Post /wp-admin/post-new.php1,526 ▼222.91 ▼0.21659.95 ▼21.7864.20 ▲11.02
Media Library /wp-admin/upload.php1,403 ▲34.22 ▲0.0596.07 ▼0.2544.35 ▲2.94

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
No output text or server-side errors detected on direct access of PHP files

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed: The official readme.txt is a good inspiration

software-sales-prices/woo-extra-product-options-addon.php 69% from 13 tests

The main PHP script in "WooCommerce Extra Product Options AddOns" version 1.0.1 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("software-sales-prices.php" instead of "woo-extra-product-options-addon.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Description: Keep the plugin description shorter than 140 characters (currently 143 characters long)
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

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
There were no executable files found in this plugin1,317 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP1327114909
JavaScript2650244
CSS3250164

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
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

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin