84% freedompay-payment-gateway

Code Review | Freedom Pay

WordPress plugin Freedom Pay scored84%from 54 tests.

About plugin

  • Plugin page: freedompay-paymen...
  • Plugin version: 1.9.5
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6-6.2
  • WordPress version: 6.3.1
  • First release: Sep 21, 2023
  • Latest release: Sep 21, 2023
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: freedompay (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /80 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 successfully, without throwing any errors or notices

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

Server-side resources used by Freedom Pay
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.41 ▼3.35
Dashboard /wp-admin3.31 ▼0.0349.94 ▼16.71
Posts /wp-admin/edit.php3.36 ▲0.0148.24 ▼4.87
Add New Post /wp-admin/post-new.php5.89 ▲0.0185.51 ▼15.72
Media Library /wp-admin/upload.php3.24 ▲0.0138.30 ▲1.51

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Freedom Pay
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.72 ▼0.582.01 ▲0.1544.20 ▲0.57
Dashboard /wp-admin2,209 ▲215.88 ▲0.04109.15 ▼7.1545.07 ▲1.08
Posts /wp-admin/edit.php2,092 ▲32.01 ▼0.0139.18 ▼0.6734.62 ▲2.61
Add New Post /wp-admin/post-new.php1,533 ▲1123.41 ▲0.09682.51 ▲7.5062.75 ▼8.45
Media Library /wp-admin/upload.php1,385 ▼34.25 ▲0.04105.76 ▲4.9347.22 ▲6.11

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/freedompay-payment-gateway/freedompay/includes/class-wc-freedompay-payment-gateway.php:14

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 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
No tags were found

freedompay-payment-gateway/freedompay-payment-gateway.php 92% from 13 tests

The main file in "Freedom Pay" v. 1.9.5 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Requires at least: The required version number must match the one declared in readme.txt ("7.4" instead of "2.6")

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
Everything looks great! No dangerous files found in this plugin1,020 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP21693651,020

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity97.00
▷ Minimum class complexity97.00
▷ Maximum class complexity97.00
Average method complexity3.09
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods46
▷ Static methods12.17%
▷ Public methods3473.91%
▷ Protected methods919.57%
▷ Private methods36.52%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants28
▷ Global constants28100.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.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
freedompay/assets/images/icon.png5.22KB2.48KB▼ 52.50%