84% woo-subscription-trial-coupon

Code Review | Free Trial Coupon for Woocommerce Subscriptions

WordPress plugin Free Trial Coupon for Woocommerce Subscriptions scored84%from 54 tests.

About plugin

  • Plugin page: woo-subscription-...
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.0.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.3.2
  • WordPress version: 6.3.1
  • First release: Oct 25, 2019
  • Latest release: Feb 4, 2020
  • Number of updates: 9
  • Update frequency: every 11.3 days
  • Top authors: Md. Jahidul Islam (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

300+ active /2,132 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.29ms] Passed 4 tests

An overview of server-side resources used by Free Trial Coupon for Woocommerce Subscriptions
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0338.65 ▼5.43
Dashboard /wp-admin3.34 ▲0.0345.01 ▼3.76
Posts /wp-admin/edit.php3.39 ▲0.0346.52 ▲3.31
Add New Post /wp-admin/post-new.php5.92 ▲0.0378.79 ▼3.92
Media Library /wp-admin/upload.php3.26 ▲0.0334.31 ▼0.03

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Free Trial Coupon for Woocommerce Subscriptions
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲6614.43 ▼0.251.71 ▼0.3944.18 ▼1.95
Dashboard /wp-admin2,218 ▲305.81 ▲0.95100.96 ▼15.1739.34 ▼7.03
Posts /wp-admin/edit.php2,101 ▲302.00 ▼0.0240.56 ▲2.5838.11 ▲1.15
Add New Post /wp-admin/post-new.php1,526 ▲717.48 ▼6.07690.37 ▲47.0258.55 ▲3.33
Media Library /wp-admin/upload.php1,400 ▲124.24 ▲0.0295.81 ▼8.6843.23 ▲1.08

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/woo-subscription-trial-coupon/woo-subscription-trial-coupon.php

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: extends free trial, woocommerce subscription free trial coupon, trial coupon, woocommerce subscription trial coupon, free trial coupon

woo-subscription-trial-coupon/woo-subscription-trial-coupon.php 85% from 13 tests

Analyzing the main PHP file in "Free Trial Coupon for Woocommerce Subscriptions" version 1.0.1
The following require your attention:
  • Text Domain: The text domain should only use lowercase characters and dashes
  • Description: Please keep the plugin description shorter than 140 characters (currently 174 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin171 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP789202137
JavaScript1101334

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity5.75
▷ Minimum class complexity1.00
▷ Maximum class complexity14.00
Average method complexity2.73
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods11
▷ Static methods545.45%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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