84% wp-pagalocard-woocommerce

Code Review | Payment Gateway for Pagalo on WooCommerce

WordPress plugin Payment Gateway for Pagalo on WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: wp-pagalocard-woo...
  • Plugin version: 1.3.3
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-5.5
  • WordPress version: 6.3.1
  • First release: Apr 17, 2018
  • Latest release: Oct 21, 2020
  • Number of updates: 28
  • Update frequency: every 32.8 days
  • Top authors: XicoOfficial (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,434 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼1.84ms] Passed 4 tests

This is a short check of server-side resources used by Payment Gateway for Pagalo on WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.27 ▼3.63
Dashboard /wp-admin3.33 ▲0.0245.04 ▲0.37
Posts /wp-admin/edit.php3.38 ▲0.0245.16 ▲1.53
Add New Post /wp-admin/post-new.php5.91 ▲0.0285.02 ▼1.98
Media Library /wp-admin/upload.php3.25 ▲0.0233.25 ▼2.11

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Payment Gateway for Pagalo on WooCommerce: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.16 ▼1.431.81 ▼0.2046.24 ▼2.16
Dashboard /wp-admin2,209 ▲205.90 ▲0.9996.35 ▼15.1138.63 ▼3.05
Posts /wp-admin/edit.php2,092 ▲32.03 ▲0.0341.24 ▲5.9433.91 ▲1.76
Add New Post /wp-admin/post-new.php1,534 ▲1423.11 ▼0.19643.90 ▼58.8753.93 ▼12.07
Media Library /wp-admin/upload.php1,382 ▼94.20 ▼0.0393.61 ▼3.4741.74 ▼4.69

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-pagalocard-woocommerce/wp-pagalocard-woocommerce.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway_CC' not found in wp-content/plugins/wp-pagalocard-woocommerce/includes/wp-pagalocard-woocommerce-admin.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Tags: Please delete some tags, you are using 16 tag instead of maximum 10
The official readme.txt might help

wp-pagalocard-woocommerce/wp-pagalocard-woocommerce.php 92% from 13 tests

The main file in "Payment Gateway for Pagalo on WooCommerce" v. 1.3.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.6" instead of "4.0.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin345 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP37792229
PO File13031116

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity7.00
▷ Minimum class complexity4.00
▷ Maximum class complexity10.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
7 PNG files occupy 0.18MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-1544x500.png49.01KB22.61KB▼ 53.87%
assets/screenshot-2.png25.46KB12.37KB▼ 51.41%
assets/screenshot-3.png14.51KB7.68KB▼ 47.10%
assets/icon-256x256.png5.77KB2.82KB▼ 51.11%
assets/banner-772x250.png51.40KB18.48KB▼ 64.04%