83% extended-trial-coupon-for-wc-subscription

Code Review | Extended Trial Coupon for WC Subscription

WordPress plugin Extended Trial Coupon for WC Subscription scored83%from 54 tests.

About plugin

  • Plugin page: extended-trial-co...
  • Plugin version: 1.3
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.0
  • WordPress version: 6.3.1
  • First release: Feb 10, 2022
  • Latest release: Jun 14, 2022
  • Number of updates: 13
  • Update frequency: every 9.6 days
  • Top authors: codeheaven (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /522 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.14MB] [CPU: ▼1.79ms] Passed 4 tests

An overview of server-side resources used by Extended Trial Coupon for WC Subscription
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1444.65 ▼2.00
Dashboard /wp-admin3.44 ▲0.1347.49 ▼4.08
Posts /wp-admin/edit.php3.55 ▲0.1948.00 ▲0.08
Add New Post /wp-admin/post-new.php6.04 ▲0.1591.29 ▼1.15
Media Library /wp-admin/upload.php3.36 ▲0.1342.08 ▲4.38

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Extended Trial Coupon for WC Subscription
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲7413.29 ▼1.111.67 ▼0.1940.13 ▼5.61
Dashboard /wp-admin2,226 ▲375.81 ▼0.1099.69 ▼8.7242.51 ▼2.86
Posts /wp-admin/edit.php2,108 ▲142.01 ▼0.0534.09 ▼4.7036.64 ▲0.53
Add New Post /wp-admin/post-new.php1,548 ▲3423.22 ▲5.70694.90 ▲13.5956.95 ▼2.08
Media Library /wp-admin/upload.php1,408 ▲204.26 ▲0.02101.70 ▼14.4646.18 ▼3.87

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 8 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • wcs_trial_coupon_installed
    • db_upgraded
    • wcs_trial_coupon_version
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/extended-trial-coupon-for-wc-subscription/includes/views/coupon-fields.php:1

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: extends free trial, woo subscription free trial coupon, trial coupon, free trial coupon, woocommerce subscription trial coupon

extended-trial-coupon-for-wc-subscription/wcs-trial-coupon.php 77% from 13 tests

"Extended Trial Coupon for WC Subscription" version 1.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 180 characters long)
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("extended-trial-coupon-for-wc-subscription.php" instead of "wcs-trial-coupon.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected1,159 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP14162281620
PO File595105429
Markdown111048
JavaScript191334
JSON20021
CSS1107

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity10.78
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.87
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes111.11%
Methods48
▷ Static methods918.75%
▷ Public methods4593.75%
▷ Protected methods12.08%
▷ Private methods24.17%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants6
▷ Global constants583.33%
▷ Class constants116.67%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin