94% paypal-payments-shortcode

Code Review | Paypal Payment Shortcode

WordPress plugin Paypal Payment Shortcode scored 94% from 54 tests.

About plugin

  • Plugin page: paypal-payments-s...
  • Plugin version: 1.01
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.9
  • WordPress version: 5.8.1
  • First release: Apr 25, 2014
  • Latest release: Jun 6, 2014
  • Number of updates: 9
  • Update frequency: every 4.7 days
  • Top authors: sonlamtn200 (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

90+ active / 4,343 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

Analyzing server-side resources used by Paypal Payment Shortcode
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0127.80 ▼6.36
Dashboard /wp-admin3.07 ▲0.0144.00 ▼0.76
Posts /wp-admin/edit.php3.12 ▲0.0138.23 ▼5.60
Add New Post /wp-admin/post-new.php5.43 ▼0.0092.24 ▼572.18
Media Library /wp-admin/upload.php3.01 ▲0.0033.02 ▼15.03

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Paypal Payment Shortcode: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲9815.79 ▲0.2311.13 ▲2.5451.23 ▲2.57
Dashboard /wp-admin2,973 ▲425.90 ▼0.32134.68 ▼25.43105.90 ▼11.92
Posts /wp-admin/edit.php2,739 ▼02.69 ▼0.0170.28 ▲6.9391.06 ▼3.60
Add New Post /wp-admin/post-new.php1,672 ▼1118.92 ▲2.23371.71 ▼9.87107.55 ▲3.52
Media Library /wp-admin/upload.php1,807 ▼05.01 ▼0.01147.96 ▼26.41117.63 ▼15.04

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/paypal-payments-shortcode/sls-paypal-payments-shortcode.php:9

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

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
2 plugin tags: shortcode, paypal

paypal-payments-shortcode/sls-paypal-payments-shortcode.php 92% from 13 tests

The main PHP file in "Paypal Payment Shortcode" ver. 1.01 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("paypal-payments-shortcode.php" instead of "sls-paypal-payments-shortcode.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected52 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11852

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.14
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin