83% additional-subscription-intervals

Code Review | Additional Intervals for WooCommerce Subscriptions

WordPress plugin Additional Intervals for WooCommerce Subscriptions scored83%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: 6.3.1
  • 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 /330 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼3.34ms] Passed 4 tests

This is a short check of server-side resources used by Additional Intervals for WooCommerce Subscriptions
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.63 ▼1.07
Dashboard /wp-admin3.31 ▼0.0443.35 ▼11.57
Posts /wp-admin/edit.php3.36 ▲0.0045.89 ▲3.01
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.24 ▼3.72
Media Library /wp-admin/upload.php3.23 ▲0.0037.33 ▲3.71

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Additional Intervals for WooCommerce Subscriptions
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.37 ▲0.441.55 ▼0.0935.95 ▼3.18
Dashboard /wp-admin2,198 ▲175.62 ▼0.1083.50 ▼21.9639.65 ▼3.59
Posts /wp-admin/edit.php2,100 ▲32.01 ▲0.0339.35 ▲3.9435.08 ▲1.54
Add New Post /wp-admin/post-new.php1,526 ▼923.70 ▲5.40636.64 ▲10.4855.09 ▼12.62
Media Library /wp-admin/upload.php1,400 ▼04.18 ▲0.00110.82 ▲12.8246.66 ▲1.67

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for 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
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 shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 79% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Stable tag: Empty string
  • Donate link: Invalid url: ""
  • Screenshots: Please add an image for screenshot #1 (These options are located in WooCommerce → Settings → Subscriptions)
You can take inspiration from this readme.txt

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

The primary PHP file in "Additional Intervals for WooCommerce Subscriptions" version 1.0.0 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Domain Path: The domain path folder does not exist ("/languages")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("additional-subscription-intervals.php" instead of "woo-sub-additional-intervals.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin41 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2111841

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
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
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.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
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%