68% gnupay-lguplus

Code Review | GNUPAY - LGUPLUS

WordPress plugin GNUPAY - LGUPLUS scored68%from 54 tests.

About plugin

  • Plugin page: gnupay-lguplus
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.5
  • WordPress version: 6.3.1
  • First release: Jun 20, 2016
  • Latest release: Feb 28, 2018
  • Number of updates: 4
  • Update frequency: every 155.3 days
  • Top authors: kagla (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /888 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.01MB] [CPU: ▼9.36ms] Passed 4 tests

A check of server-side resources used by GNUPAY - LGUPLUS
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.38 ▼4.36
Dashboard /wp-admin3.31 ▼0.0444.31 ▼13.28
Posts /wp-admin/edit.php3.36 ▲0.0045.71 ▼5.04
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.27 ▼14.76
Media Library /wp-admin/upload.php3.23 ▲0.0034.38 ▲0.73

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 58 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for GNUPAY - LGUPLUS
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲6113.68 ▼0.861.59 ▼0.2339.75 ▼2.82
Dashboard /wp-admin2,206 ▲185.82 ▲0.91105.33 ▲3.4040.61 ▼3.19
Posts /wp-admin/edit.php2,086 ▼31.99 ▼0.0634.80 ▼7.4432.91 ▼2.41
Add New Post /wp-admin/post-new.php1,533 ▲522.82 ▲4.77647.59 ▲32.4964.16 ▲14.59
Media Library /wp-admin/upload.php1,382 ▼64.16 ▼0.0495.32 ▼6.6442.31 ▼1.13

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% 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 0% 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
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/gnupay-lguplus/lgu/mispwapurl.php
    • > /wp-content/plugins/gnupay-lguplus/lgu/cancel_url.php
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Parse error
      syntax error, unexpected 'new' (T_NEW) in wp-content/plugins/gnupay-lguplus/lgu/lgdacom/patch.php on line 24
    • > PHP Parse error
      syntax error, unexpected 'new' (T_NEW) in wp-content/plugins/gnupay-lguplus/lgu/lgdacom/ping.php on line 24

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 on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
9 plugin tags: card, korea, kagla, payment, sirsoft...

gnupay-lguplus/gnupay_lguplus.php 92% from 13 tests

The main PHP file in "GNUPAY - LGUPLUS" ver. 1.1.1 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("gnupay-lguplus.php" instead of "gnupay_lguplus.php")

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Please make sure to remedy the following
  • Do not distribute dangerous files with your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/gnupay-lguplus/lgu/lgdacom/conf/ca-bundle.crt
6,343 lines of code in 45 files:
LanguageFilesBlank linesComment linesLines of code
PHP401,5231,3125,552
PO File1160211369
JavaScript29121340
CSS26782

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity28.10
▷ Minimum class complexity1.00
▷ Maximum class complexity115.00
Average method complexity3.90
▷ Minimum method complexity1.00
▷ Maximum method complexity67.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes20
▷ Abstract classes00.00%
▷ Concrete classes20100.00%
▷ Final classes00.00%
Methods188
▷ Static methods10.53%
▷ Public methods18497.87%
▷ Protected methods31.60%
▷ Private methods10.53%
Functions27
▷ Named functions27100.00%
▷ Anonymous functions00.00%
Constants62
▷ Global constants62100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected