84% payment-gateway-paypalme

Code Review | Paypal.me - An offline payment gateway

WordPress plugin Paypal.me - An offline payment gateway scored84%from 54 tests.

About plugin

  • Plugin page: payment-gateway-p...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.7.1
  • WordPress version: 6.3.1
  • First release: Jan 11, 2017
  • Latest release: Jan 11, 2017
  • Number of updates: 6
  • Update frequency: N/A
  • Top authors: smitraval (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

500+ active /3,553 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.03MB] [CPU: ▼4.07ms] Passed 4 tests

A check of server-side resources used by Paypal.me - An offline payment gateway
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.25 ▼2.23
Dashboard /wp-admin3.33 ▲0.0351.15 ▼1.90
Posts /wp-admin/edit.php3.39 ▲0.0350.28 ▼4.26
Add New Post /wp-admin/post-new.php5.92 ▲0.0389.32 ▼7.88
Media Library /wp-admin/upload.php3.26 ▲0.0338.14 ▲0.94

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: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Paypal.me - An offline payment gateway
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.58 ▼0.781.84 ▲0.0243.66 ▲2.93
Dashboard /wp-admin2,209 ▲184.83 ▼0.03107.64 ▲5.0241.32 ▼6.87
Posts /wp-admin/edit.php2,092 ▲32.05 ▲0.0039.62 ▼1.5735.72 ▼3.74
Add New Post /wp-admin/post-new.php1,533 ▲523.19 ▲5.07650.00 ▲26.8452.58 ▲2.30
Media Library /wp-admin/upload.php1,391 ▲94.19 ▼0.02102.03 ▼1.6043.30 ▼0.40

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 did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • 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
Even though no errors were found, this is by no means an exhaustive test

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 fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/payment-gateway-paypalme/payment-gateway-paypal.me.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 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
7 plugin tags: gateway, paypalme gateway, paypal gateway, paypalme, payment gateway...

payment-gateway-paypalme/payment-gateway-paypal.me.php 85% from 13 tests

The main file in "Paypal.me - An offline payment gateway" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 155 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("payment-gateway-paypalme.php" instead of "payment-gateway-paypal.me.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
No dangerous file extensions were detected135 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12632135

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity18.00
▷ Minimum class complexity18.00
▷ Maximum class complexity18.00
Average method complexity3.43
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected