68% subscriptions-recurring-payments-for-woocommerce

Code Review | Subscriptions & Recurring Payments for WooCommerce

WordPress plugin Subscriptions & Recurring Payments for WooCommerce scored 68% from 54 tests.

About plugin

  • Plugin page: subscriptions-rec...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.0-6.0.1
  • WordPress version: 6.3.1
  • First release: Aug 30, 2022
  • Latest release: Aug 30, 2022
  • Number of updates: 2
  • Update frequency: every 3.0 days
  • Top authors: wppath (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 664 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by Subscriptions & Recurring Payments for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2342.96 ▲0.59
Dashboard /wp-admin3.40 ▲0.0935.65 ▼9.57
Posts /wp-admin/edit.php3.46 ▲0.1139.12 ▼21.27
Add New Post /wp-admin/post-new.php5.64 ▼0.2578.43 ▼25.46
Media Library /wp-admin/upload.php3.40 ▲0.1734.33 ▲0.45
Scheduled Actions /wp-admin/tools.php?page=action-scheduler3.5932.19

Server storage [IO: ▲3.39MB] [DB: ▲0.01MB] Passed 3 tests

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 378 new files
Database: 4 new tables, 10 new options
New tables
wp_actionscheduler_actions
wp_actionscheduler_logs
wp_actionscheduler_claims
wp_actionscheduler_groups
New WordPress options
widget_recent-posts
theysaidso_admin_options
action_scheduler_lock_async-request-runner
widget_theysaidso_widget
db_upgraded
schema-ActionScheduler_StoreSchema
widget_recent-comments
action_scheduler_hybrid_store_demarkation
can_compress_scripts
schema-ActionScheduler_LoggerSchema

Browser metrics Passed 4 tests

This is an overview of browser requirements for Subscriptions & Recurring Payments for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,811 ▲7613.24 ▼1.131.69 ▼0.5544.12 ▼0.79
Dashboard /wp-admin2,214 ▲234.85 ▼0.05107.00 ▲1.5043.43 ▼0.97
Posts /wp-admin/edit.php2,099 ▲102.00 ▼0.0539.15 ▼1.0137.27 ▲3.58
Add New Post /wp-admin/post-new.php1,556 ▲2023.29 ▲0.16640.39 ▼45.1662.58 ▲12.53
Media Library /wp-admin/upload.php1,402 ▲174.19 ▼0.0697.02 ▼11.1642.76 ▼6.45
Scheduled Actions /wp-admin/tools.php?page=action-scheduler1,2091.8227.4727.65

Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] 50% from 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The plugin did not uninstall successfully, leaving 4 tables in the database
    • wp_actionscheduler_groups
    • wp_actionscheduler_claims
    • wp_actionscheduler_logs
    • wp_actionscheduler_actions
  • This plugin does not fully uninstall, leaving 10 options in the database
    • action_scheduler_hybrid_store_demarkation
    • can_compress_scripts
    • schema-ActionScheduler_StoreSchema
    • widget_theysaidso_widget
    • action_scheduler_lock_async-request-runner
    • widget_recent-comments
    • schema-ActionScheduler_LoggerSchema
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
    • > GET request to /wp-admin/tools.php?page=action-scheduler
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method AWC_Backend::awc_notice_need_woocommerce() should not be called statically

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
Please take a closer look at the following
  • 54× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Order' not found in wp-content/plugins/subscriptions-recurring-payments-for-woocommerce/inc/classes/class-awc-subscription.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_Store' not found in wp-content/plugins/subscriptions-recurring-payments-for-woocommerce/inc/libraries/action-scheduler/classes/data-stores/ActionScheduler_HybridStore.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Action_Scheduler\\Migration\\LogMigrator' not found in wp-content/plugins/subscriptions-recurring-payments-for-woocommerce/inc/libraries/action-scheduler/classes/migration/DryRun_LogMigrator.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_Abstract_Schedule' not found in wp-content/plugins/subscriptions-recurring-payments-for-woocommerce/inc/libraries/action-scheduler/classes/abstracts/ActionScheduler_Abstract_RecurringSchedule.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_Abstract_ListTable' not found in wp-content/plugins/subscriptions-recurring-payments-for-woocommerce/inc/libraries/action-scheduler/classes/ActionScheduler_ListTable.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'ActionScheduler_Schedule' not found in wp-content/plugins/subscriptions-recurring-payments-for-woocommerce/inc/libraries/action-scheduler/deprecated/ActionScheduler_Schedule_Deprecated.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_Logger' not found in wp-content/plugins/subscriptions-recurring-payments-for-woocommerce/inc/libraries/action-scheduler/classes/data-stores/ActionScheduler_DBLogger.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_Abstract_RecurringSchedule' not found in wp-content/plugins/subscriptions-recurring-payments-for-woocommerce/inc/libraries/action-scheduler/classes/schedules/ActionScheduler_CronSchedule.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'CronExpression_AbstractField' not found in wp-content/plugins/subscriptions-recurring-payments-for-woocommerce/inc/libraries/action-scheduler/lib/cron-expression/CronExpression_MonthField.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WP_CLI_Command' not found in wp-content/plugins/subscriptions-recurring-payments-for-woocommerce/inc/libraries/action-scheduler/classes/WP_CLI/Migration_Command.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 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
These attributes need to be fixed:
  • Donate link: Please fix this invalid URI: ""
The official readme.txt is a good inspiration

subscriptions-recurring-payments-for-woocommerce/aco-woo-subscriptions.php 85% from 13 tests

"Subscriptions & Recurring Payments for WooCommerce" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 275 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("subscriptions-recurring-payments-for-woocommerce.php" instead of "aco-woo-subscriptions.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin45,598 lines of code in 373 files:
LanguageFilesBlank linesComment linesLines of code
PHP32914,65623,93742,543
JavaScript194673272,207
CSS85215409
PO File1139151326
SVG1600113

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity26.24
▷ Minimum class complexity1.00
▷ Maximum class complexity391.00
Average method complexity3.53
▷ Minimum method complexity1.00
▷ Maximum method complexity92.00
Code structure
Namespaces2
Interfaces4
Traits0
Classes264
▷ Abstract classes3011.36%
▷ Concrete classes23488.64%
▷ Final classes10.43%
Methods2,739
▷ Static methods1,03937.93%
▷ Public methods2,27683.10%
▷ Protected methods39914.57%
▷ Private methods642.34%
Functions223
▷ Named functions21194.62%
▷ Anonymous functions125.38%
Constants139
▷ Global constants128.63%
▷ Class constants12791.37%
▷ Public constants127100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin