89% woo-subscription-extras

Code Review | WooCommerce Subscriptions Extras

WordPress plugin WooCommerce Subscriptions Extras scored89%from 54 tests.

About plugin

  • Plugin page: woo-subscription-...
  • Plugin version: 1.0.23
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.5.1
  • WordPress version: 6.3.1
  • First release: Jan 20, 2019
  • Latest release: Nov 23, 2020
  • Number of updates: 32
  • Update frequency: every 21.0 days
  • Top authors: moiseh (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

200+ active /7,147 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.22MB] [CPU: ▼4.69ms] Passed 4 tests

This is a short check of server-side resources used by WooCommerce Subscriptions Extras
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.2247.54 ▲2.67
Dashboard /wp-admin3.57 ▲0.2751.29 ▼1.64
Posts /wp-admin/edit.php3.63 ▲0.2652.33 ▼7.02
Add New Post /wp-admin/post-new.php6.09 ▲0.2089.75 ▼10.05
Media Library /wp-admin/upload.php3.43 ▲0.2039.80 ▼0.06

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for WooCommerce Subscriptions Extras
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.27 ▼0.071.96 ▲0.1842.73 ▼3.28
Dashboard /wp-admin2,198 ▲215.62 ▼0.0493.52 ▼1.9642.02 ▲1.41
Posts /wp-admin/edit.php2,097 ▼32.13 ▲0.1039.75 ▼4.0238.00 ▼1.18
Add New Post /wp-admin/post-new.php1,527 ▼123.70 ▲0.63602.24 ▼79.5448.68 ▼3.67
Media Library /wp-admin/upload.php1,403 ▲34.20 ▲0.0297.51 ▼11.4043.41 ▼3.87

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • 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)
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: price, pricing, woocommerce, bulk, subscriptions...

woo-subscription-extras/wselite.php 85% from 13 tests

"WooCommerce Subscriptions Extras" version 1.0.23's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("woo-subscription-extras.php" instead of "wselite.php")
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.8" instead of "3.5")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected1,197 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP4285521,131
CSS19045
JavaScript18221

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity28.67
▷ Minimum class complexity6.00
▷ Maximum class complexity60.00
Average method complexity2.28
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods65
▷ Static methods23.08%
▷ Public methods5787.69%
▷ Protected methods00.00%
▷ Private methods812.31%
Functions21
▷ Named functions21100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants133.33%
▷ Class constants266.67%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
common/assets/alert.png0.42KB0.45KB0.00%
common/assets/youtube.png0.27KB0.22KB▼ 18.25%