90% birthday-discount-vouchers

Code Review | WooCommerce Birthday Discount Vouchers

WordPress plugin WooCommerce Birthday Discount Vouchers scored90%from 54 tests.

About plugin

  • Plugin page: birthday-discount...
  • Plugin version: 1.0.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.6
  • WordPress version: 6.3.1
  • First release: Sep 19, 2018
  • Latest release: Jan 2, 2021
  • Number of updates: 11
  • Update frequency: every 77.8 days
  • Top authors: dorihsk (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

300+ active /7,563 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

A check of server-side resources used by WooCommerce Birthday Discount Vouchers
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0041.20 ▼0.82
Dashboard /wp-admin3.31 ▲0.0050.31 ▼2.64
Posts /wp-admin/edit.php3.36 ▲0.0051.08 ▼1.75
Add New Post /wp-admin/post-new.php5.89 ▲0.0095.88 ▲4.27
Media Library /wp-admin/upload.php3.23 ▲0.0035.28 ▼6.02

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

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

Browser metrics Passed 4 tests

WooCommerce Birthday Discount Vouchers: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.38 ▼0.801.71 ▼0.3438.33 ▼7.34
Dashboard /wp-admin2,209 ▲214.86 ▼1.0098.36 ▼12.0038.93 ▼6.79
Posts /wp-admin/edit.php2,092 ▲32.03 ▼0.0240.09 ▲2.9534.50 ▼3.31
Add New Post /wp-admin/post-new.php1,533 ▼023.12 ▼0.25603.26 ▼62.9950.89 ▼9.34
Media Library /wp-admin/upload.php1,391 ▲34.21 ▼0.0799.92 ▼6.4044.72 ▼2.10

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

Smoke tests Passed 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 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
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
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: birthday discount vouchers, woocommerce coupons, woocommerce discount, birthday reminder, woocommerce birthday coupons

birthday-discount-vouchers/birthday-discount-vouchers.php Passed 13 tests

"WooCommerce Birthday Discount Vouchers" version 1.0.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
84 characters long description:
This plugin allows you to send discount vouchers to your customers on their birthday

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 detected4,177 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
CSS8931862,745
PHP42131231,133
JavaScript113349299

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity68.50
▷ Minimum class complexity12.00
▷ Maximum class complexity125.00
Average method complexity4.86
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods35
▷ Static methods00.00%
▷ Public methods35100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/select2.png0.60KB0.99KB0.00%