79% subaccounts-for-woocommerce

Code Review | Subaccounts for WooCommerce

WordPress plugin Subaccounts for WooCommerce scored79%from 54 tests.

About plugin

  • Plugin page: subaccounts-for-w...
  • Plugin version: 1.4.3
  • PHP compatiblity: 5.7+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.4
  • WordPress version: 6.3.1
  • First release: Jun 24, 2022
  • Latest release: Oct 25, 2023
  • Number of updates: 44
  • Update frequency: every 11.2 days
  • Top authors: mediaticus (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

100+ active /2,379 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲5.34MB] [CPU: ▲25.47ms] 75% from 4 tests

This is a short check of server-side resources used by Subaccounts for WooCommerce
Please fix the following
  • Extra RAM: Try to keep extra memory usage under 5MB (currently 5.34MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /9.21 ▲5.7560.49 ▲21.03
Dashboard /wp-admin9.23 ▲5.9368.34 ▲19.13
Posts /wp-admin/edit.php9.23 ▲5.8776.60 ▲33.47
Add New Post /wp-admin/post-new.php9.70 ▲3.81121.13 ▲36.86
Media Library /wp-admin/upload.php9.23 ▲6.0064.03 ▲28.26
Freemius Debug [v.2.5.12] /wp-admin/admin.php?page=freemius9.2354.45

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Subaccounts for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,839 ▲7814.24 ▼0.161.75 ▲0.0530.69 ▼13.57
Dashboard /wp-admin2,220 ▲465.64 ▲0.12128.34 ▲39.7358.30 ▲16.58
Posts /wp-admin/edit.php2,129 ▲322.11 ▲0.1440.93 ▲6.5840.30 ▲5.46
Add New Post /wp-admin/post-new.php1,539 ▲1323.19 ▲0.08668.53 ▲20.1656.10 ▲8.21
Media Library /wp-admin/upload.php1,422 ▲224.18 ▼0.0796.71 ▲3.3046.00 ▲3.82
Freemius Debug [v.2.5.12] /wp-admin/admin.php?page=freemius1,0721.6827.3131.24

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/subaccounts-for-woocommerce/freemius/includes/class-freemius.php+8515
    Undefined property: stdClass::$plugins
  • Zombie WordPress options detected upon uninstall: 9 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • fs_accounts
    • fs_debug_mode
    • fs_active_plugins
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Congratulations! This plugin passed the SRP 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 97% 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 need to be fixed:
  • Tags: There are too many tags (12 tag instead of maximum 10)
The official readme.txt is a good inspiration

subaccounts-for-woocommerce/subaccounts-for-woocommerce.php Passed 13 tests

"Subaccounts for WooCommerce" version 1.4.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
110 characters long description:
Subaccounts for WooCommerce allows the creation of subaccounts for your WooCommerce customers and subscribers.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin41,602 lines of code in 148 files:
LanguageFilesBlank linesComment linesLines of code
PHP12310,45819,25537,062
JavaScript55619832,945
CSS17112122986
PO File11800379
Markdown1680214
XML13016

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Please tend to the following items
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 3,088)
Cyclomatic complexity
Average complexity per logical line of code0.66
Average class complexity93.38
▷ Minimum class complexity1.00
▷ Maximum class complexity3,088.00
Average method complexity4.60
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes48
▷ Abstract classes24.17%
▷ Concrete classes4695.83%
▷ Final classes00.00%
Methods1,259
▷ Static methods19815.73%
▷ Public methods86969.02%
▷ Protected methods171.35%
▷ Private methods37329.63%
Functions175
▷ Named functions17298.29%
▷ Anonymous functions31.71%
Constants147
▷ Global constants10068.03%
▷ Class constants4731.97%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
6 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
assets/css/images/ui-icons_555555_256x240.png6.96KB4.18KB▼ 39.91%
assets/css/images/ui-icons_ffffff_256x240.png6.39KB4.18KB▼ 34.52%
assets/css/images/ui-icons_444444_256x240.png6.97KB4.18KB▼ 40.04%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%