83% pagodigital

Code Review | Dpago

WordPress plugin Dpago scored83%from 54 tests.

About plugin

  • Plugin page: pagodigital
  • Plugin version: 3.2.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.3.1
  • WordPress version: 6.3.1
  • First release: Sep 21, 2022
  • Latest release: Nov 27, 2023
  • Number of updates: 44
  • Update frequency: every 9.8 days
  • Top authors: joelantonio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,668 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: ▼5.51ms] Passed 4 tests

An overview of server-side resources used by Dpago
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0034.68 ▼9.53
Dashboard /wp-admin3.31 ▼0.0446.87 ▼16.05
Posts /wp-admin/edit.php3.36 ▲0.0046.77 ▼0.82
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.06 ▲4.35
Media Library /wp-admin/upload.php3.23 ▲0.0038.46 ▲5.02

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

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

Browser metrics Passed 4 tests

Dpago: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲3214.21 ▲0.051.60 ▼0.5735.79 ▼8.30
Dashboard /wp-admin2,195 ▲245.62 ▲0.0491.17 ▼10.6842.54 ▼2.92
Posts /wp-admin/edit.php2,100 ▼32.02 ▲0.0638.80 ▲3.7336.20 ▲2.28
Add New Post /wp-admin/post-new.php1,528 ▲223.53 ▲0.51614.82 ▼83.9059.32 ▲9.21
Media Library /wp-admin/upload.php1,400 ▼34.19 ▲0.0094.32 ▼1.5941.20 ▼4.30

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not 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
Please fix the following items
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/pagodigital/woocommerce-dpago-gateway.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/pagodigital/includes/payment-checkout-description.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pagodigital/wocommerce-dpago.php:11

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

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Donate link: Please fix this invalid url: ""
  • Contributors: Plugin contributors field is missing
Please take inspiration from this readme.txt

pagodigital/wocommerce-dpago.php 92% from 13 tests

This is the main PHP file of "Dpago" version 3.2.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("pagodigital.php" instead of "wocommerce-dpago.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin662 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP311565577
SVG10158
CSS22015
Markdown17012

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity3.33
▷ Minimum method complexity1.00
▷ Maximum method complexity13.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%
Functions22
▷ Named functions2195.45%
▷ Anonymous functions14.55%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/icon-256x256.png17.49KB8.25KB▼ 52.86%