84% extra-product-addons-for-woocommerce

Code Review | Extra Product Options (Custom Addons) for WooCommerce

WordPress plugin Extra Product Options (Custom Addons) for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: extra-product-add...
  • Plugin version: 1.2.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.0-6.3.2
  • WordPress version: 6.3.1
  • First release: Aug 30, 2021
  • Latest release: Oct 21, 2023
  • Number of updates: 30
  • Update frequency: every 26.1 days
  • Top authors: themeparrot (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /2,603 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

Analyzing server-side resources used by Extra Product Options (Custom Addons) for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.53 ▲2.38
Dashboard /wp-admin3.31 ▲0.0045.87 ▼2.10
Posts /wp-admin/edit.php3.36 ▲0.0047.51 ▲0.67
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.65 ▼4.84
Media Library /wp-admin/upload.php3.23 ▲0.0035.47 ▲0.59

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Extra Product Options (Custom Addons) for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.24 ▼0.111.93 ▲0.1043.25 ▲2.23
Dashboard /wp-admin2,198 ▲275.62 ▲0.1290.70 ▲0.5242.31 ▲0.39
Posts /wp-admin/edit.php2,100 ▲32.01 ▼0.0239.76 ▲5.1135.84 ▲1.00
Add New Post /wp-admin/post-new.php1,526 ▼1123.46 ▲5.36660.61 ▲30.3955.33 ▼16.66
Media Library /wp-admin/upload.php1,400 ▼04.25 ▲0.1194.59 ▼2.1240.56 ▼3.81

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/extra-product-addons-for-woocommerce/config.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
You can look at the official readme.txt

extra-product-addons-for-woocommerce/extra-product-addons-for-woocommerce.php 92% from 13 tests

This is the main PHP file of "Extra Product Options (Custom Addons) for WooCommerce" version 1.2.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 168 characters long)

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 plugin2,592 lines of code in 38 files:
LanguageFilesBlank linesComment linesLines of code
PHP314175902,152
JavaScript42733250
CSS2300180
XML10010

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity14.28
▷ Minimum class complexity1.00
▷ Maximum class complexity74.00
Average method complexity3.88
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces8
Interfaces0
Traits0
Classes25
▷ Abstract classes00.00%
▷ Concrete classes25100.00%
▷ Final classes00.00%
Methods119
▷ Static methods4941.18%
▷ Public methods11798.32%
▷ Protected methods00.00%
▷ Private methods21.68%
Functions9
▷ Named functions111.11%
▷ Anonymous functions888.89%
Constants20
▷ Global constants20100.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