78% yayextra

Code Review | YayExtra - WooCommerce Extra Product Options

WordPress plugin YayExtra - WooCommerce Extra Product Options scored78%from 54 tests.

About plugin

  • Plugin page: yayextra
  • Plugin version: 1.3
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Aug 26, 2022
  • Latest release: Nov 28, 2023
  • Number of updates: 30
  • Update frequency: every 15.3 days
  • Top authors: yaycommerce (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

500+ active /6,833 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.19MB] [CPU: ▼5.76ms] Passed 4 tests

This is a short check of server-side resources used by YayExtra - WooCommerce Extra Product Options
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.2038.25 ▼4.33
Dashboard /wp-admin3.50 ▲0.1647.95 ▼11.41
Posts /wp-admin/edit.php3.62 ▲0.2645.63 ▼1.39
Add New Post /wp-admin/post-new.php6.10 ▲0.2285.24 ▼5.89
Media Library /wp-admin/upload.php3.43 ▲0.2034.78 ▲0.43
Other plugins /wp-admin/admin.php?page=yaycommerce-other-plugins3.4033.70
Licenses /wp-admin/admin.php?page=yaycommerce-licenses3.4332.94
Help /wp-admin/admin.php?page=yaycommerce-help3.2324.81

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 42 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for YayExtra - WooCommerce Extra Product Options
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,848 ▲10114.14 ▼0.211.66 ▼0.0542.35 ▼3.63
Dashboard /wp-admin2,250 ▲725.65 ▼0.0494.79 ▼16.1942.87 ▼0.52
Posts /wp-admin/edit.php2,162 ▲622.01 ▼0.0141.43 ▲6.8336.63 ▲1.45
Add New Post /wp-admin/post-new.php1,560 ▲3422.95 ▼0.33582.14 ▼191.7456.22 ▼7.98
Media Library /wp-admin/upload.php1,458 ▲644.30 ▲0.06107.27 ▼1.4248.61 ▲3.51
Other plugins /wp-admin/admin.php?page=yaycommerce-other-plugins1,1302.3533.5831.58
Licenses /wp-admin/admin.php?page=yaycommerce-licenses1,1272.0323.8533.55
Help /wp-admin/admin.php?page=yaycommerce-help280.410.073.73

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 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)
The smoke test was a success, however most plugin functionality was not tested

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
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Notice
      Undefined variable: recommendedPlugins in wp-content/plugins/yayextra/includes/YayCommerceMenu/views/other-plugins-content.php on line 22

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=yaycommerce-help
    • > Network (severe)
    wp-admin/admin.php?page=yaycommerce-help - Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: woocommerce product fields, extra product options, woocommerce product options, product customizer, product addons

yayextra/yayextra.php 92% from 13 tests

"YayExtra - WooCommerce Extra Product Options" version 1.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.0" instead of "3.0.0")

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
There were no executable files found in this plugin10,502 lines of code in 39 files:
LanguageFilesBlank linesComment linesLines of code
PHP297551,0545,565
CSS3320753,289
JavaScript61891621,645
SVG1003

PHP code Passed 2 tests

Analyzing 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.73
Average class complexity96.30
▷ Minimum class complexity1.00
▷ Maximum class complexity585.00
Average method complexity7.35
▷ Minimum method complexity1.00
▷ Maximum method complexity92.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods153
▷ Static methods6139.87%
▷ Public methods14393.46%
▷ Protected methods10.65%
▷ Private methods95.88%
Functions10
▷ Named functions330.00%
▷ Anonymous functions770.00%
Constants9
▷ Global constants9100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin