68% woo-coupon-reminder

Code Review | Coreem - Coupon Reminder for WooCommerce

WordPress plugin Coreem - Coupon Reminder for WooCommerce scored68%from 54 tests.

About plugin

  • Plugin page: woo-coupon-reminder
  • Plugin version: 2.1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Aug 24, 2019
  • Latest release: Jul 15, 2023
  • Number of updates: 32
  • Update frequency: every 44.4 days
  • Top authors: dragonlord47 (65.63%)mrtien (28.13%)villatheme (9.38%)kimvt1991 (6.25%)

Code review

54 tests

User reviews

2 reviews

Install metrics

60+ active /2,174 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.63MB] [CPU: ▲1.93ms] Passed 4 tests

This is a short check of server-side resources used by Coreem - Coupon Reminder for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.14 ▲0.6847.13 ▲8.63
Dashboard /wp-admin3.98 ▲0.6356.60 ▼9.69
Posts /wp-admin/edit.php4.03 ▲0.6757.97 ▲12.09
Add New Post /wp-admin/post-new.php6.50 ▲0.6194.75 ▼3.31
Media Library /wp-admin/upload.php3.84 ▲0.6145.86 ▲12.34
Email Templates /wp-admin/edit.php?post_type=viwcr_email_template3.9642.56
Scheduled email /wp-admin/edit.php?post_type=viwcr_email_template&page=viwcr_scheduled_email3.8539.40
Statistics email /wp-admin/edit.php?post_type=viwcr_email_template&page=viwcr_statistics_email3.8440.57

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 51 new files
Database: 1 new table, 6 new options
New tables
wp_viwcr_statistics
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Coreem - Coupon Reminder for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,981 ▲22013.53 ▼0.765.50 ▲3.7942.00 ▼1.78
Dashboard /wp-admin2,279 ▲764.86 ▼0.02113.93 ▼5.4849.56 ▲3.74
Posts /wp-admin/edit.php2,155 ▲552.13 ▲0.0937.69 ▲0.7734.34 ▼2.28
Add New Post /wp-admin/post-new.php1,572 ▲3717.40 ▼5.98683.28 ▼14.5751.48 ▼5.25
Media Library /wp-admin/upload.php1,461 ▲614.23 ▼0.05111.65 ▲5.9751.81 ▲3.49
Email Templates /wp-admin/edit.php?post_type=viwcr_email_template1,3202.4537.2630.54
Scheduled email /wp-admin/edit.php?post_type=viwcr_email_template&page=viwcr_scheduled_email1,0992.1228.9743.88
Statistics email /wp-admin/edit.php?post_type=viwcr_email_template&page=viwcr_statistics_email1,1782.1328.8532.37

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie tables detected upon uninstall: 1 table
    • wp_viwcr_statistics
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 50% from 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 0% 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× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/woo-coupon-reminder/admin/partials/woo-coupon-reminder-admin-display.php
    • > /wp-content/plugins/woo-coupon-reminder/public/partials/woo-coupon-reminder-public-display.php
  • 7× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/woo-coupon-reminder/admin/partials/woo-coupon-reminder-statistics.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/woo-coupon-reminder/admin/partials/display-detail-email-template-page.php:10
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/woo-coupon-reminder/admin/partials/woo-coupon-reminder-statistics.php on line 3
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/woo-coupon-reminder/admin/partials/woo-coupon-reminder-statistics.php on line 3
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/woo-coupon-reminder/admin/partials/woo-coupon-reminder-schedule.php on line 3
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/woo-coupon-reminder/admin/partials/woo-coupon-reminder-schedule.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/woo-coupon-reminder/admin/partials/woo-coupon-reminder-schedule.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
These attributes need your attention: The official readme.txt is a good inspiration

woo-coupon-reminder/woo-coupon-reminder.php 92% from 13 tests

"Coreem - Coupon Reminder for WooCommerce" version 2.1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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 plugin5,814 lines of code in 40 files:
LanguageFilesBlank linesComment linesLines of code
PHP155038392,878
SVG1041,514
JavaScript67853917
CSS1748105309
PO File18296196

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity37.27
▷ Minimum class complexity1.00
▷ Maximum class complexity222.00
Average method complexity4.62
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods111
▷ Static methods119.91%
▷ Public methods10291.89%
▷ Protected methods21.80%
▷ Private methods76.31%
Functions5
▷ Named functions360.00%
▷ Anonymous functions240.00%
Constants5
▷ Global constants5100.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
PNG images were not found in this plugin