90% woo-attributes-coupon

Code Review | Woo Attributes Coupon

WordPress plugin Woo Attributes Coupon scored90%from 54 tests.

About plugin

  • Plugin page: woo-attributes-co...
  • Plugin version: 2.2.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Sep 27, 2016
  • Latest release: Apr 29, 2019
  • Number of updates: 7
  • Update frequency: every 134.9 days
  • Top authors: GauravNagpal (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

500+ active /4,637 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

This is a short check of server-side resources used by Woo Attributes Coupon
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.51 ▲2.00
Dashboard /wp-admin3.31 ▼0.0342.43 ▼21.44
Posts /wp-admin/edit.php3.36 ▲0.0144.02 ▼4.86
Add New Post /wp-admin/post-new.php5.89 ▲0.0182.08 ▼15.81
Media Library /wp-admin/upload.php3.23 ▲0.0137.46 ▲3.85

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Woo Attributes Coupon
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.74 ▲0.391.68 ▼0.0439.93 ▼1.44
Dashboard /wp-admin2,198 ▲205.59 ▼0.1388.30 ▼7.0139.57 ▼2.91
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0734.65 ▼1.8632.42 ▼5.08
Add New Post /wp-admin/post-new.php1,526 ▼023.24 ▼0.06654.49 ▼21.6351.39 ▼2.00
Media Library /wp-admin/upload.php1,400 ▼04.21 ▲0.0495.66 ▼2.9843.48 ▼0.94

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

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)
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Requires at least: Version not formatted correctly
The official readme.txt might help

woo-attributes-coupon/woo-attributes-coupon.php Passed 13 tests

The main file in "Woo Attributes Coupon" v. 2.2.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
126 characters long description:
Woocommerce coupon section extension for adding coupon for special attributes and tags. Also, you can categorized the coupons.

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
There were no executable files found in this plugin424 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP5109292388
PO File17736

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity36.00
▷ Minimum class complexity36.00
▷ Maximum class complexity36.00
Average method complexity3.69
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods26
▷ Static methods726.92%
▷ Public methods2180.77%
▷ Protected methods00.00%
▷ Private methods519.23%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png38.85KB19.15KB▼ 50.72%