84% simple-payu-latam

Code Review | Simple PayU LATAM

WordPress plugin Simple PayU LATAM scored84%from 54 tests.

About plugin

  • Plugin page: simple-payu-latam
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-4.3.1
  • WordPress version: 6.3.1
  • First release: Jun 26, 2015
  • Latest release: Oct 7, 2015
  • Number of updates: 5
  • Update frequency: every 20.8 days
  • Top authors: softpill.eu (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,967 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.15MB] [CPU: ▼3.62ms] Passed 4 tests

A check of server-side resources used by Simple PayU LATAM
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1444.08 ▲4.32
Dashboard /wp-admin3.45 ▲0.1551.25 ▼0.65
Posts /wp-admin/edit.php3.50 ▲0.1547.94 ▼5.13
Add New Post /wp-admin/post-new.php6.03 ▲0.1592.16 ▼9.91
Media Library /wp-admin/upload.php3.38 ▲0.1538.11 ▲1.20
Settings /wp-admin/admin.php?page=sp_spl_settings3.3435.46
Payment Forms /wp-admin/admin.php?page=sp_spl_payment_forms3.3334.45
Records /wp-admin/admin.php?page=sp_spl_records3.3534.01
About /wp-admin/admin.php?page=sp_spl_about3.3434.56

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 17 new files
Database: 1 new table, 6 new options
New tables
wp_simplepayulatam_trans
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Simple PayU LATAM
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲6214.35 ▼0.001.81 ▲0.1643.95 ▲0.39
Dashboard /wp-admin2,229 ▲555.65 ▲0.0093.65 ▲3.3645.05 ▲1.14
Posts /wp-admin/edit.php2,131 ▲281.97 ▼0.0434.43 ▼3.6937.18 ▲2.29
Add New Post /wp-admin/post-new.php1,554 ▲2623.04 ▲0.19682.84 ▲15.0556.16 ▲3.06
Media Library /wp-admin/upload.php1,434 ▲344.21 ▼0.0197.53 ▼9.9441.15 ▼4.86
Settings /wp-admin/admin.php?page=sp_spl_settings8562.0325.9731.53
Payment Forms /wp-admin/admin.php?page=sp_spl_payment_forms8902.0022.9529.76
Records /wp-admin/admin.php?page=sp_spl_records9402.0424.3626.89
About /wp-admin/admin.php?page=sp_spl_about8872.0822.8426.55

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

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 | 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 fix the following items
  • 7× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/simple-payu-latam/includes/simplepayulatam.records.php on line 19
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/simple-payu-latam/simplepayulatam.php on line 25
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/simple-payu-latam/includes/simplepayulatam.records.php on line 19
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/simple-payu-latam/includes/simplepayulatam.records.php on line 19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-payu-latam/includes/simplepayulatam_frontend.php:84
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/simple-payu-latam/simplepayulatam.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-payu-latam/includes/simplepayulatam_admin.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: payu latam, payu, invoices, process invoices, pay online...

simple-payu-latam/simplepayulatam.php 92% from 13 tests

The main file in "Simple PayU LATAM" v. 1.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:
  • Main file name: Name the main plugin file the same as the plugin slug ("simple-payu-latam.php" instead of "simplepayulatam.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
There were no executable files found in this plugin3,360 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP92345512,805
JavaScript2105133308
CSS29050244
HTML1003

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity69.33
▷ Minimum class complexity2.00
▷ Maximum class complexity196.00
Average method complexity6.26
▷ Minimum method complexity1.00
▷ Maximum method complexity56.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods39
▷ Static methods00.00%
▷ Public methods39100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
No PNG images were found in this plugin