83% manual-payment-gateway-paypal

Code Review | Paypal Manual Payment Gateway

WordPress plugin Paypal Manual Payment Gateway scored83%from 54 tests.

About plugin

  • Plugin page: manual-payment-ga...
  • Plugin version: 1.1
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.8
  • WordPress version: 6.3.1
  • First release: Jan 12, 2021
  • Latest release: Aug 19, 2021
  • Number of updates: 6
  • Update frequency: every 36.5 days
  • Top authors: zitengine (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,033 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.01MB] [CPU: ▼9.08ms] Passed 4 tests

This is a short check of server-side resources used by Paypal Manual Payment Gateway
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.90 ▲2.56
Dashboard /wp-admin3.31 ▼0.0444.02 ▼17.57
Posts /wp-admin/edit.php3.36 ▲0.0048.58 ▲3.46
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.15 ▼23.04
Media Library /wp-admin/upload.php3.23 ▲0.0035.39 ▲1.75

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Paypal Manual Payment Gateway
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.23 ▼0.111.79 ▼0.0440.88 ▲0.28
Dashboard /wp-admin2,198 ▲275.63 ▼0.0294.00 ▼6.9442.03 ▲1.46
Posts /wp-admin/edit.php2,100 ▼32.01 ▼0.0035.55 ▲0.8933.32 ▼1.19
Add New Post /wp-admin/post-new.php1,535 ▲918.32 ▼5.23646.96 ▲29.6056.52 ▲2.82
Media Library /wp-admin/upload.php1,403 ▲64.18 ▲0.0198.03 ▼3.3043.74 ▲1.30

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/manual-payment-gateway-paypal/paypal.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% 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 need to be fixed: Please take inspiration from this readme.txt

manual-payment-gateway-paypal/paypal.php 69% from 13 tests

The principal PHP file in "Paypal Manual Payment Gateway" v. 1.1 is loaded by WordPress automatically on each request
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 356 characters long)
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: The principal plugin file should be the same as the plugin slug ("manual-payment-gateway-paypal.php" instead of "paypal.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected301 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP28063296
JavaScript1005

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.17
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/paypal.png1.65KB1.59KB▼ 3.54%