89% advanced-woo-labels

Code Review | Advanced Woo Labels - Product Labels for WooCommerce

WordPress plugin Advanced Woo Labels - Product Labels for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: advanced-woo-labels
  • Plugin version: 1.82
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.4
  • WordPress version: 6.3.1
  • First release: Jul 11, 2020
  • Latest release: Nov 27, 2023
  • Number of updates: 109
  • Update frequency: every 11.3 days
  • Top authors: Mihail Barinov (100%)

Code review

54 tests

User reviews

44 reviews

Install metrics

10,000+ active /293,627 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.02MB] [CPU: ▼6.15ms] Passed 4 tests

An overview of server-side resources used by Advanced Woo Labels - Product Labels for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0337.11 ▼3.49
Dashboard /wp-admin3.34 ▼0.0151.96 ▼9.94
Posts /wp-admin/edit.php3.46 ▲0.0946.87 ▼1.54
Add New Post /wp-admin/post-new.php5.92 ▲0.0388.34 ▼9.64
Media Library /wp-admin/upload.php3.26 ▲0.0334.10 ▲0.83

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Advanced Woo Labels - Product Labels for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲914.67 ▼0.041.73 ▼0.1736.18 ▼7.40
Dashboard /wp-admin2,204 ▲275.61 ▼0.0397.17 ▼4.0443.72 ▲0.10
Posts /wp-admin/edit.php2,107 ▲101.94 ▼0.0638.68 ▼0.5338.28 ▼2.33
Add New Post /wp-admin/post-new.php1,532 ▼423.16 ▼0.16597.95 ▼64.7652.07 ▼0.14
Media Library /wp-admin/upload.php1,406 ▲64.20 ▼0.0199.85 ▼4.7244.06 ▼0.26

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

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)
Everything seems fine, however this is by no means 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

advanced-woo-labels/advanced-woo-labels.php 92% from 13 tests

The primary PHP file in "Advanced Woo Labels - Product Labels for WooCommerce" version 1.82 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Requires at least: The required version number must match 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 programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected9,538 lines of code in 62 files:
LanguageFilesBlank linesComment linesLines of code
PHP522,8092,2196,798
CSS2257461,423
JavaScript423946817
PO File12334497
SVG3003

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity24.76
▷ Minimum class complexity1.00
▷ Maximum class complexity114.00
Average method complexity3.84
▷ Minimum method complexity1.00
▷ Maximum method complexity43.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes50
▷ Abstract classes00.00%
▷ Concrete classes50100.00%
▷ Final classes12.00%
Methods418
▷ Static methods10023.92%
▷ Public methods35384.45%
▷ Protected methods00.00%
▷ Private methods6515.55%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
25 compressed PNG files occupy 0.37MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/pro/feature-shapes-pro.png20.50KB21.29KB0.00%
assets/img/label-7.png0.38KB0.38KB0.00%
assets/img/pro/user-cond-pro.png17.07KB17.05KB0.13%
assets/img/label-2.png0.30KB0.31KB0.00%
assets/img/pro/feature-wcfm-pro.png39.37KB41.97KB0.00%