99% advanced-woo-labels

Code Review | Advanced Woo Labels - Product Labels for WooCommerce

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

About plugin

  • Plugin page: advanced-woo-labels
  • Plugin version: 1.41
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-5.9
  • WordPress version: 5.9.2
  • First release: Jul 11, 2020
  • Latest release: Mar 22, 2022
  • Number of updates: 58
  • Update frequency: every 10.7 days
  • Top authors: Mihail Barinov (100%)

Code review

54 tests

User reviews

24 reviews

Install metrics

6,000+ active / 68,030 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

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

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.55 ▲0.0360.32 ▲2.38
Dashboard /wp-admin3.44 ▲0.0337.11 ▲0.51
Posts /wp-admin/edit.php3.67 ▲0.0341.37 ▼6.51
Add New Post /wp-admin/post-new.php6.91 ▼0.0697.38 ▼1,185.63
Media Library /wp-admin/upload.php3.32 ▲0.0326.20 ▲0.72

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 74 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Advanced Woo Labels - Product Labels for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,773 ▲1915.97 ▼0.156.94 ▼0.842.25 ▼0.38
Dashboard /wp-admin2,905 ▲446.16 ▼0.06116.21 ▼13.51154.69 ▼16.27
Posts /wp-admin/edit.php2,698 ▲103.23 ▼0.0165.64 ▼2.54138.31 ▼15.30
Add New Post /wp-admin/post-new.php1,696 ▼2121.64 ▲0.53420.24 ▲11.59166.46 ▲10.54
Media Library /wp-admin/upload.php1,705 ▲75.49 ▼0.02150.97 ▲6.00195.70 ▲15.22

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

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)
Even though no errors were found, this is by no means an exhaustive test

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

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)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
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

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

The entry point to "Advanced Woo Labels - Product Labels for WooCommerce" version 1.41 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Requires at least: The required version number did not 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 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 plugin7,783 lines of code in 46 files:
LanguageFilesBlank linesComment linesLines of code
PHP362,1201,6025,223
CSS2238441,297
JavaScript422046763
PO File12334497
SVG3003

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity26.20
▷ Minimum class complexity1.00
▷ Maximum class complexity86.00
Average method complexity3.89
▷ Minimum method complexity1.00
▷ Maximum method complexity43.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes35
▷ Abstract classes00.00%
▷ Concrete classes35100.00%
▷ Final classes12.86%
Methods305
▷ Static methods7524.59%
▷ Public methods24580.33%
▷ Protected methods00.00%
▷ Private methods6019.67%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
25 compressed PNG files occupy 0.37MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/pro/user-cond-pro.png17.07KB17.05KB0.13%
assets/img/pro/feature-styles-pro.png16.60KB17.35KB0.00%
assets/img/pro/feature-acf-pro.png20.96KB22.21KB0.00%
assets/img/pro/pro-feature-acf.png18.93KB19.78KB0.00%
assets/img/label-3.png0.38KB0.39KB0.00%