93% additional-subscription-intervals

Code Review | Additional Intervals for WooCommerce Subscriptions

WordPress plugin Additional Intervals for WooCommerce Subscriptions scored 93% from 54 tests.

About plugin

  • Plugin page: additional-subscr...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.5.3
  • WordPress version: 5.9.2
  • First release: Nov 28, 2020
  • Latest release: Nov 28, 2020
  • Number of updates: 2
  • Update frequency: every 1.0 days
  • Top authors: wpnomad (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 154 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼296.75ms] Passed 4 tests

An overview of server-side resources used by Additional Intervals for WooCommerce Subscriptions
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0259.09 ▲2.48
Dashboard /wp-admin3.43 ▲0.0234.27 ▼0.68
Posts /wp-admin/edit.php3.66 ▲0.0240.38 ▼18.42
Add New Post /wp-admin/post-new.php6.90 ▼0.0796.23 ▼1,168.50
Media Library /wp-admin/upload.php3.31 ▲0.0223.84 ▲0.62

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Additional Intervals for WooCommerce Subscriptions: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,795 ▲4115.87 ▼0.086.48 ▼0.012.60 ▲0.02
Dashboard /wp-admin2,895 ▲346.08 ▼0.06123.28 ▼9.70202.45 ▼26.35
Posts /wp-admin/edit.php2,694 ▼03.24 ▼0.0064.30 ▼23.86143.83 ▲2.69
Add New Post /wp-admin/post-new.php1,661 ▲116.10 ▼5.88424.75 ▼15.68172.38 ▲14.45
Media Library /wp-admin/upload.php1,695 ▼05.43 ▼0.07150.01 ▲6.21200.05 ▲8.36

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however 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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/additional-subscription-intervals/includes/additional-interval-setting.php:2

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


Plugin configuration 79% from 29 tests

readme.txt 81% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Donate link: Please fix this invalid URI: ""
  • Stable tag: No string
  • Screenshots: Add an image for screenshot #1 (These options are located in WooCommerce → Settings → Subscriptions)
The official readme.txt is a good inspiration

additional-subscription-intervals/woo-sub-additional-intervals.php 77% from 13 tests

Analyzing the main PHP file in "Additional Intervals for WooCommerce Subscriptions" version 1.0.0
You should first fix the following items:
  • Domain Path: The domain path folder does not exist ("/languages")
  • Main file name: Name the main plugin file the same as the plugin slug ("additional-subscription-intervals.php" instead of "woo-sub-additional-intervals.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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 detected41 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.12
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
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions2100.00%
▷ Anonymous functions00.00%
▷ 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
1 PNG file occupies 0.09MB with 0.06MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
settings-screenshot.png88.16KB25.15KB▼ 71.47%