89% variation-auto-expire-for-woocommerce

Code Review | Variation Auto Expire For WooCommerce

WordPress plugin Variation Auto Expire For WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: variation-auto-ex...
  • Plugin version: 1.0.4
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.1-6.3
  • WordPress version: 6.3.1
  • First release: Jan 20, 2023
  • Latest release: Aug 9, 2023
  • Number of updates: 31
  • Update frequency: every 6.5 days
  • Top authors: yakacj (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /444 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
Installer ran successfully

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

An overview of server-side resources used by Variation Auto Expire For WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.04 ▼3.62
Dashboard /wp-admin3.31 ▲0.0051.45 ▲1.52
Posts /wp-admin/edit.php3.36 ▲0.0048.63 ▼6.68
Add New Post /wp-admin/post-new.php5.89 ▲0.0094.90 ▼8.27
Media Library /wp-admin/upload.php3.23 ▲0.0035.03 ▼4.98

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Variation Auto Expire For WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.38 ▲0.031.90 ▲0.2445.73 ▼7.60
Dashboard /wp-admin2,198 ▲185.59 ▼0.0884.67 ▼11.1739.86 ▼0.79
Posts /wp-admin/edit.php2,103 ▲32.03 ▲0.0639.10 ▼3.5735.22 ▼1.99
Add New Post /wp-admin/post-new.php1,526 ▼023.63 ▲0.50618.06 ▼82.4261.00 ▼6.76
Media Library /wp-admin/upload.php1,400 ▲34.17 ▼0.08101.24 ▼0.7444.24 ▲1.97

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

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

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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 13 tag instead of maximum 10
Please take inspiration from this readme.txt

variation-auto-expire-for-woocommerce/ycve.php 92% from 13 tests

The main file in "Variation Auto Expire For WooCommerce" v. 1.0.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("variation-auto-expire-for-woocommerce.php" instead of "ycve.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin328 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP7166392328

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity8.40
▷ Minimum class complexity3.00
▷ Maximum class complexity17.00
Average method complexity2.19
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods31
▷ Static methods00.00%
▷ Public methods2270.97%
▷ Protected methods00.00%
▷ Private methods929.03%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin