74% startend-subscription-add-on-for-gravityforms

Code Review | STARTEND Subscription Add-On for GravityForms

WordPress plugin STARTEND Subscription Add-On for GravityForms scored74%from 54 tests.

About plugin

  • Plugin page: startend-subscrip...
  • Plugin version: 4.0.6
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Sep 14, 2022
  • Latest release: Aug 14, 2023
  • Number of updates: 8
  • Update frequency: every 41.8 days
  • Top authors: zerozendesign (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /345 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.53MB] [CPU: ▼2.04ms] Passed 4 tests

This is a short check of server-side resources used by STARTEND Subscription Add-On for GravityForms
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.05 ▲0.5941.07 ▼2.46
Dashboard /wp-admin3.89 ▲0.5956.16 ▲4.89
Posts /wp-admin/edit.php3.94 ▲0.5850.04 ▼1.30
Add New Post /wp-admin/post-new.php6.41 ▲0.5291.52 ▼9.27
Media Library /wp-admin/upload.php3.65 ▲0.4246.04 ▲11.02
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius3.9841.50
STARTEND Subscription Add-On for GravityForms /wp-admin/admin.php?page=gravitystripe-start-date-addon3.8843.72

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 202 new files
Database: no new tables, 9 new options
New WordPress options
can_compress_scripts
widget_recent-comments
fs_active_plugins
fs_accounts
widget_recent-posts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
fs_debug_mode

Browser metrics Passed 4 tests

STARTEND Subscription Add-On for GravityForms: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲7014.14 ▼0.211.80 ▲0.0932.34 ▼12.91
Dashboard /wp-admin2,209 ▲325.56 ▼0.0492.38 ▼0.4246.39 ▲2.66
Posts /wp-admin/edit.php2,118 ▲181.99 ▼0.0534.01 ▼3.8335.29 ▼2.48
Add New Post /wp-admin/post-new.php1,531 ▲323.40 ▲0.37670.90 ▼40.2357.08 ▼10.59
Media Library /wp-admin/upload.php1,417 ▲144.11 ▼0.04111.19 ▲13.2250.18 ▲8.29
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,0691.6627.0429.60
STARTEND Subscription Add-On for GravityForms /wp-admin/admin.php?page=gravitystripe-start-date-addon9761.6526.3357.97

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
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/startend-subscription-add-on-for-gravityforms/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • Zombie WordPress options detected upon uninstall: 9 options
    • widget_recent-posts
    • can_compress_scripts
    • fs_active_plugins
    • fs_debug_mode
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • fs_accounts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/startend-subscription-add-on-for-gravityforms/includes/script.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/startend-subscription-add-on-for-gravityforms/gravitystripe-start-date-addon.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'GFForms' not found in wp-content/plugins/startend-subscription-add-on-for-gravityforms/includes/class-gse-addon.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
6 plugin tags: date, gravity forms, stripe, cancel subscription, addon...

startend-subscription-add-on-for-gravityforms/gravitystripe-start-date-addon.php 92% from 13 tests

This is the main PHP file of "STARTEND Subscription Add-On for GravityForms" version 4.0.6, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("startend-subscription-add-on-for-gravityforms.php" instead of "gravitystripe-start-date-addon.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin37,696 lines of code in 146 files:
LanguageFilesBlank linesComment linesLines of code
PHP1258,40617,67535,545
CSS17941001,909
JavaScript45461242

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Please fix the following
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity95.08
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.66
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes51
▷ Abstract classes23.92%
▷ Concrete classes4996.08%
▷ Final classes00.00%
Methods1,339
▷ Static methods19814.79%
▷ Public methods94370.43%
▷ Protected methods171.27%
▷ Private methods37928.30%
Functions103
▷ Named functions103100.00%
▷ Anonymous functions00.00%
Constants149
▷ Global constants10268.46%
▷ Class constants4731.54%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
10 PNG files occupy 0.06MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/ui-icons_777620_256x240.png4.57KB4.18KB▼ 8.43%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
css/images/ui-icons_ffffff_256x240.png6.33KB4.18KB▼ 33.99%
css/images/calendar.png0.25KB0.28KB0.00%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%