84% pensopay-checkout-terms-subscriptions

Code Review | pensopay Checkout Terms (Subscriptions)

WordPress plugin pensopay Checkout Terms (Subscriptions) scored84%from 54 tests.

About plugin

  • Plugin page: pensopay-checkout...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-6.1
  • WordPress version: 6.3.1
  • First release: Nov 11, 2022
  • Latest release: Nov 14, 2022
  • Number of updates: 5
  • Update frequency: every 0.6 days
  • Top authors: patrickthagaard (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /843 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

Server-side resources used by pensopay Checkout Terms (Subscriptions)
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0234.47 ▼3.91
Dashboard /wp-admin3.33 ▼0.0143.85 ▼10.18
Posts /wp-admin/edit.php3.38 ▲0.0344.95 ▼4.45
Add New Post /wp-admin/post-new.php5.91 ▲0.0380.15 ▼21.00
Media Library /wp-admin/upload.php3.26 ▲0.0332.86 ▼0.74
Pensopay Checkout Terms Settings /wp-admin/options-general.php?page=pensopay-checkout-terms3.2331.25

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

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

Browser metrics Passed 4 tests

Checking browser requirements for pensopay Checkout Terms (Subscriptions)
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.24 ▼0.111.67 ▼0.2642.84 ▼5.01
Dashboard /wp-admin2,196 ▲225.53 ▼0.0183.60 ▲0.0636.65 ▼5.35
Posts /wp-admin/edit.php2,104 ▲42.04 ▲0.0333.41 ▼2.7236.87 ▼0.97
Add New Post /wp-admin/post-new.php1,531 ▲523.10 ▼0.47664.56 ▼21.8360.36 ▲5.36
Media Library /wp-admin/upload.php1,404 ▲74.20 ▲0.00103.27 ▲2.5044.25 ▼0.11
Pensopay Checkout Terms Settings /wp-admin/options-general.php?page=pensopay-checkout-terms8761.9925.9539.01

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pensopay-checkout-terms-subscriptions/pensopay-checkout-terms.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% 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
3 plugin tags: woocommerce, clearhaus, subscriptions

pensopay-checkout-terms-subscriptions/pensopay-checkout-terms.php 85% from 13 tests

This is the main PHP file of "pensopay Checkout Terms (Subscriptions)" version 1.0.1, 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:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("pensopay-checkout-terms-subscriptions.php" instead of "pensopay-checkout-terms.php")

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 plugin106 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1201079
PO File12427

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
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%
Functions6
▷ Named functions6100.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
There were not PNG files found in your plugin