83% wupo-group-attributes

Code Review | WUPO Group Attributes for WooCommerce

WordPress plugin WUPO Group Attributes for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: wupo-group-attrib...
  • Plugin version: 2.3.3
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-6.2.2
  • WordPress version: 6.3.1
  • First release: May 6, 2020
  • Latest release: Jul 22, 2023
  • Number of updates: 44
  • Update frequency: every 26.6 days
  • Top authors: wupo (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

500+ active /6,489 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲5.40MB] [CPU: ▲21.13ms] 75% from 4 tests

A check of server-side resources used by WUPO Group Attributes for WooCommerce
It is recommended to improve the following
  • Extra RAM: The extra memory usage must be under 5MB (currently 5.40MB on /wp-admin/options-general.php?page=wugrat_settings)
PageMemory (MB)CPU Time (ms)
Home /9.21 ▲5.7466.43 ▲26.34
Dashboard /wp-admin9.23 ▲5.8881.48 ▲16.30
Posts /wp-admin/edit.php9.23 ▲5.8778.06 ▲28.62
Add New Post /wp-admin/post-new.php9.98 ▲4.10113.21 ▲13.25
Media Library /wp-admin/upload.php9.23 ▲6.0077.03 ▲41.97
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius9.2366.37
WUPO Group Attributes /wp-admin/options-general.php?page=wugrat_settings9.2368.46

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 201 new files
Database: no new tables, 11 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
wc_wugrat_settings_tab_general_enable_wugrat
fs_active_plugins
widget_recent-posts
theysaidso_admin_options
fs_accounts
can_compress_scripts
fs_debug_mode
...

Browser metrics Passed 4 tests

A check of browser resources used by WUPO Group Attributes for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,847 ▲10113.20 ▼1.181.77 ▲0.1631.38 ▼10.35
Dashboard /wp-admin2,225 ▲375.84 ▲0.92102.28 ▼2.3043.72 ▼0.02
Posts /wp-admin/edit.php2,108 ▲192.04 ▲0.0337.35 ▲0.2943.82 ▲9.29
Add New Post /wp-admin/post-new.php1,522 ▲323.09 ▼0.23672.91 ▼12.7957.46 ▼1.84
Media Library /wp-admin/upload.php1,404 ▲194.22 ▲0.03110.45 ▼6.9650.26 ▲1.99
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,0722.0532.7830.93
WUPO Group Attributes /wp-admin/options-general.php?page=wugrat_settings9801.7126.0356.89

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options were found after uninstall: 11 options
    • fs_debug_mode
    • fs_active_plugins
    • wc_wugrat_settings_tab_general_enable_wugrat
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • wc_wugrat_settings_tab_styling_layout
    • theysaidso_admin_options
    • db_upgraded
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wupo-group-attributes/admin/class-wugrat-admin.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention: The official readme.txt is a good inspiration

wupo-group-attributes/wupo-group-attributes.php 85% from 13 tests

The main PHP file in "WUPO Group Attributes for WooCommerce" ver. 2.3.3 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("5.0" instead of "5.0.0")
  • Description: Please keep the plugin description shorter than 140 characters (currently 262 characters long)

Code Analysis 97% from 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 plugin34,483 lines of code in 147 files:
LanguageFilesBlank linesComment linesLines of code
PHP1298,15617,70634,150
JavaScript55862320
CSS130013

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Please fix the following
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity81.96
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.54
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes56
▷ Abstract classes23.57%
▷ Concrete classes5496.43%
▷ Final classes00.00%
Methods1,311
▷ Static methods20315.48%
▷ Public methods91569.79%
▷ Protected methods171.30%
▷ Private methods37928.91%
Functions107
▷ Named functions107100.00%
▷ Anonymous functions00.00%
Constants148
▷ Global constants10168.24%
▷ Class constants4731.76%
▷ 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
3 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/img/icon-256x256.png17.77KB18.97KB0.00%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%