84% first-payment-date-for-woocommerce-subscriptions

Code Review | First payment date for WooCommerce Subscriptions

WordPress plugin First payment date for WooCommerce Subscriptions scored84%from 54 tests.

About plugin

  • Plugin page: first-payment-dat...
  • Plugin version: 0.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Mar 3, 2019
  • Latest release: Sep 27, 2023
  • Number of updates: 28
  • Update frequency: every 59.6 days
  • Top authors: carazo (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

600+ active /12,256 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
This plugin's installer ran successfully

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

An overview of server-side resources used by First payment date for WooCommerce Subscriptions
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0340.65 ▼1.24
Dashboard /wp-admin3.33 ▲0.0348.88 ▼0.09
Posts /wp-admin/edit.php3.38 ▲0.0346.46 ▼5.58
Add New Post /wp-admin/post-new.php5.91 ▲0.0385.58 ▼21.66
Media Library /wp-admin/upload.php3.25 ▲0.0339.21 ▲3.91

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for First payment date for WooCommerce Subscriptions
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,792 ▲3114.37 ▼0.011.89 ▲0.1043.61 ▼0.15
Dashboard /wp-admin2,198 ▲215.69 ▲0.0493.55 ▲3.4938.07 ▼0.69
Posts /wp-admin/edit.php2,103 ▲32.01 ▲0.0537.34 ▲1.2532.07 ▼3.03
Add New Post /wp-admin/post-new.php1,548 ▼223.13 ▲0.06646.54 ▼16.8050.83 ▼10.17
Media Library /wp-admin/upload.php1,400 ▼04.24 ▼0.04102.66 ▲0.1342.29 ▼1.76

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/first-payment-date-for-woocommerce-subscriptions/first-payment-date-for-woocommerce-subscriptions.php:17

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)
Everything seems fine, but this is not an exhaustive test

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
6 plugin tags: woocommerce subscriptions, woocommerce, trial, subscriptions, period...

first-payment-date-for-woocommerce-subscriptions/first-payment-date-for-woocommerce-subscriptions.php 85% from 13 tests

Analyzing the main PHP file in "First payment date for WooCommerce Subscriptions" version 0.6
Please take the time to fix the following:
  • Requires at least: Required version must match the one declared in readme.txt ("3.4" instead of "3.0.0")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 192 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
There were no executable files found in this plugin426 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP19014387
PO File192239

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity48.00
▷ Minimum class complexity48.00
▷ Maximum class complexity48.00
Average method complexity3.14
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods22
▷ Static methods14.55%
▷ Public methods22100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected