78% minimum-signup-period-for-woo-subscriptions

Code Review | Minimum Signup Period For WooCommerce Subscriptions

WordPress plugin Minimum Signup Period For WooCommerce Subscriptions scored78%from 54 tests.

About plugin

  • Plugin page: minimum-signup-pe...
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-6.0.0
  • WordPress version: 6.3.1
  • First release: Aug 7, 2020
  • Latest release: Sep 3, 2022
  • Number of updates: 31
  • Update frequency: every 24.4 days
  • Top authors: Elliotvs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /725 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.17ms] Passed 4 tests

Analyzing server-side resources used by Minimum Signup Period For WooCommerce Subscriptions
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.91 ▼7.54
Dashboard /wp-admin3.33 ▲0.0345.46 ▲0.86
Posts /wp-admin/edit.php3.38 ▲0.0248.58 ▲0.07
Add New Post /wp-admin/post-new.php5.91 ▲0.0292.93 ▼7.10
Media Library /wp-admin/upload.php3.25 ▲0.0233.51 ▼2.12
Woo Signup Period /wp-admin/options-general.php?page=wsmsp3.1929.01

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Minimum Signup Period For WooCommerce Subscriptions: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4713.30 ▼1.161.78 ▼0.8348.42 ▼2.01
Dashboard /wp-admin2,213 ▲254.86 ▼0.04100.43 ▼12.0540.97 ▼0.11
Posts /wp-admin/edit.php2,096 ▲72.02 ▼0.0440.52 ▼0.5935.36 ▼1.97
Add New Post /wp-admin/post-new.php1,545 ▲1718.39 ▼0.08624.85 ▼21.6163.36 ▲7.39
Media Library /wp-admin/upload.php1,389 ▲14.23 ▲0.0094.58 ▼1.0241.30 ▼2.30
Woo Signup Period /wp-admin/options-general.php?page=wsmsp9012.0324.9632.18

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wsmsp
    • > Notice in wp-content/plugins/minimum-signup-period-for-woo-subscriptions/admin-options.php+73
    Undefined index: wsmsp_custom_data
    • > GET request to /wp-admin/options-general.php?page=wsmsp
    • > Notice in wp-content/plugins/minimum-signup-period-for-woo-subscriptions/admin-options.php+86
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/minimum-signup-period-for-woo-subscriptions/wsmsp.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/minimum-signup-period-for-woo-subscriptions/admin-options.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

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
8 plugin tags: signup, trial, term, upfront, woocommerce...

minimum-signup-period-for-woo-subscriptions/wsmsp.php 77% from 13 tests

"Minimum Signup Period For WooCommerce Subscriptions" version 1.1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 283 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("minimum-signup-period-for-woo-subscriptions.php" instead of "wsmsp.php")
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.7" instead of "3.4")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin348 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP29950348

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected