83% relario-pay

Code Review | relario PAY Donation & Paywall Plugin

WordPress plugin relario PAY Donation & Paywall Plugin scored83%from 54 tests.

About plugin

  • Plugin page: relario-pay
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.2
  • WordPress version: 6.3.1
  • First release: May 2, 2023
  • Latest release: Sep 29, 2023
  • Number of updates: 11
  • Update frequency: every 13.6 days
  • Top authors: relario (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /182 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.16MB] [CPU: ▼2.45ms] Passed 4 tests

Analyzing server-side resources used by relario PAY Donation & Paywall Plugin
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0845.86 ▲2.38
Dashboard /wp-admin3.48 ▲0.1848.59 ▲0.67
Posts /wp-admin/edit.php3.60 ▲0.2447.91 ▼7.69
Add New Post /wp-admin/post-new.php6.08 ▲0.2093.63 ▼3.72
Media Library /wp-admin/upload.php3.40 ▲0.1839.35 ▲0.96
Relario PAY /wp-admin/options-general.php?page=relario-pay3.3738.02

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 30 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

relario PAY Donation & Paywall Plugin: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,904 ▲11813.69 ▼0.919.28 ▲7.2843.62 ▼0.19
Dashboard /wp-admin2,202 ▲225.64 ▲0.0285.69 ▼15.2844.22 ▲2.01
Posts /wp-admin/edit.php2,104 ▲41.95 ▼0.0836.62 ▼1.1033.57 ▼2.78
Add New Post /wp-admin/post-new.php1,530 ▲223.14 ▲0.12654.12 ▼38.5660.78 ▼11.84
Media Library /wp-admin/upload.php1,404 ▲44.13 ▼0.09103.45 ▼6.8650.39 ▲3.26
Relario PAY /wp-admin/options-general.php?page=relario-pay9001.9925.5031.98

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function absint() in wp-content/plugins/relario-pay/templates/buttons/donate.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/relario-pay/templates/buttons/button.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: Add descriptions for screenshots #1, #2, #3, #4, #5, #6 in relario-pay/assets to your readme.txt
  • Donate link: Invalid url: ""
  • Requires php: Version not formatted correctly
Please take inspiration from this readme.txt

relario-pay/plugin.php 92% from 13 tests

The principal PHP file in "relario PAY Donation & Paywall Plugin" v. 1.0.5 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("relario-pay.php" instead of "plugin.php")

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
Success! There were no dangerous files found in this plugin12,686 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
JSON20011,798
PHP12229352521
CSS2272207
JavaScript43725129
SVG10031

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity7.00
▷ Minimum class complexity2.00
▷ Maximum class complexity24.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods30
▷ Static methods13.33%
▷ Public methods30100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions1090.91%
▷ Anonymous functions19.09%
Constants1
▷ Global constants1100.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.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/front-end/img/support.png13.03KB5.25KB▼ 59.72%