84% woo-coupon-url

Code Review | Woo Coupon URL

WordPress plugin Woo Coupon URL scored84%from 54 tests.

About plugin

  • Plugin page: woo-coupon-url
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.1.1
  • WordPress version: 6.3.1
  • First release: Dec 29, 2018
  • Latest release: Mar 17, 2019
  • Number of updates: 3
  • Update frequency: every 26.3 days
  • Top authors: personaldiscount (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

1,000+ active /6,953 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.05MB] [CPU: ▼12.49ms] Passed 4 tests

Server-side resources used by Woo Coupon URL
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0638.82 ▼5.19
Dashboard /wp-admin3.35 ▲0.0147.55 ▼19.93
Posts /wp-admin/edit.php3.47 ▲0.1149.01 ▼5.66
Add New Post /wp-admin/post-new.php5.96 ▲0.0783.36 ▼19.19
Media Library /wp-admin/upload.php3.28 ▲0.0538.46 ▲4.57

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Woo Coupon URL
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,876 ▲9013.38 ▼1.008.27 ▲6.0440.22 ▼2.41
Dashboard /wp-admin2,196 ▲195.55 ▲0.0388.93 ▲4.4340.29 ▲2.09
Posts /wp-admin/edit.php2,104 ▲42.01 ▲0.0237.68 ▲1.6236.75 ▲2.23
Add New Post /wp-admin/post-new.php1,530 ▲222.88 ▼0.13664.67 ▼13.0751.46 ▼3.96
Media Library /wp-admin/upload.php1,404 ▲14.15 ▼0.0398.44 ▼5.8541.92 ▼6.20

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Please fix the following items
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/woo-coupon-url/public/partials/woo-coupon-url-public-display.php
    • > /wp-content/plugins/woo-coupon-url/admin/partials/woo-coupon-url-admin-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
7 plugin tags: link, discount, url, coupon, automatic...

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

The main PHP script in "Woo Coupon URL" version 1.0.0 is automatically included on every request by WordPress
72 characters long description:
Attach a coupon code to yout URL and apply it automatically to the cart.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected192 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12123541186
JavaScript24546
CSS2080

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.12
Average class complexity2.00
▷ Minimum class complexity1.00
▷ Maximum class complexity5.00
Average method complexity1.28
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods25
▷ Static methods28.00%
▷ Public methods2080.00%
▷ Protected methods00.00%
▷ Private methods520.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin