10% woocommerce-coupon-schedule

Code Review | WooCommerce Coupon Schedule

WordPress plugin WooCommerce Coupon Schedule scored 10% from 54 tests.

About plugin

  • Plugin page: woocommerce-coupo...
  • Plugin version: 0.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.8.1
  • WordPress version: 6.3.1
  • First release: Oct 20, 2014
  • Latest release: Aug 18, 2017
  • Number of updates: 7
  • Update frequency: every 147.6 days
  • Top authors: karolisg (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

200+ active / 6,651 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/woocommerce-coupon-schedule/coupon-schedule.php+34
    Methods with the same name as their class will not be constructors in a future version of PHP; WooCommerceCouponSchedule has a deprecated constructor

Server metrics [RAM: ▼1.89MB] [CPU: ▼55.54ms] Passed 4 tests

This is a short check of server-side resources used by WooCommerce Coupon Schedule
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.09 ▼1.375.25 ▼33.06
Dashboard /wp-admin2.11 ▼1.197.08 ▼49.24
Posts /wp-admin/edit.php2.11 ▼1.246.50 ▼43.20
Add New Post /wp-admin/post-new.php2.11 ▼3.776.12 ▼96.66
Media Library /wp-admin/upload.php2.11 ▼1.125.14 ▼31.55

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

WooCommerce Coupon Schedule: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲9613.24 ▼1.512.11 ▲0.3744.13 ▲2.36
Dashboard /wp-admin2,208 ▲174.89 ▼0.0197.41 ▼5.4742.08 ▼7.07
Posts /wp-admin/edit.php2,097 ▲52.00 ▼0.0437.25 ▼3.6939.31 ▲4.11
Add New Post /wp-admin/post-new.php1,417 ▼12521.96 ▲3.57555.01 ▼56.9338.09 ▼19.97
Media Library /wp-admin/upload.php1,390 ▼14.18 ▼0.0999.39 ▼4.3341.53 ▼3.12

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/woocommerce-coupon-schedule/coupon-schedule.php+34
    Methods with the same name as their class will not be constructors in a future version of PHP; WooCommerceCouponSchedule has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
4 plugin tags: coupon, woocommerce, schedule, coupon expiry time

woocommerce-coupon-schedule/coupon-schedule.php 85% from 13 tests

Analyzing the main PHP file in "WooCommerce Coupon Schedule" version 0.1.2
The following require your attention:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("woocommerce-coupon-schedule.php" instead of "coupon-schedule.php")

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
Good job! No executable or dangerous file extensions detected249 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP13424126
CSS211063
PO File28852
JavaScript2358

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.19
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity2.12
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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 were not PNG files found in your plugin