89% paga-checkout

Code Review | PagaCheckout for WooCommerce

WordPress plugin PagaCheckout for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: paga-checkout
  • Plugin version: 2.0.3
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jul 10, 2020
  • Latest release: Oct 29, 2021
  • Number of updates: 34
  • Update frequency: every 14.0 days
  • Top authors: pagadevcomm (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /864 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
Install script ran successfully

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

This is a short check of server-side resources used by PagaCheckout for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0141.50 ▼2.06
Dashboard /wp-admin3.32 ▲0.0152.93 ▼1.97
Posts /wp-admin/edit.php3.37 ▲0.0147.47 ▼3.06
Add New Post /wp-admin/post-new.php5.90 ▲0.0191.86 ▼8.10
Media Library /wp-admin/upload.php3.24 ▲0.0136.96 ▼1.63

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for PagaCheckout for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲3514.10 ▼0.251.67 ▲0.0743.81 ▲6.34
Dashboard /wp-admin2,205 ▲255.58 ▼0.0690.78 ▲1.9644.68 ▲1.45
Posts /wp-admin/edit.php2,107 ▲72.04 ▲0.0335.39 ▼2.9835.63 ▼6.31
Add New Post /wp-admin/post-new.php1,535 ▼123.01 ▲4.73670.89 ▲17.7468.35 ▼4.70
Media Library /wp-admin/upload.php1,407 ▲74.17 ▼0.0397.63 ▼20.1944.04 ▼2.31

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Requires at least: The plugin version is formatted incorrectly
  • Tags: Please delete some tags, you are using 17 tag instead of maximum 10
You can look at the official readme.txt

paga-checkout/paga-checkout.php Passed 13 tests

The main file in "PagaCheckout for WooCommerce" v. 2.0.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
44 characters long description:
Paga Checkout for accepting online payments.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected583 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP2174243528
JavaScript27742
CSS17013

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity63.00
▷ Minimum class complexity63.00
▷ Maximum class complexity63.00
Average method complexity4.88
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
5 PNG files occupy 3.40MB with 1.97MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/paga-checkout-on-checkout-page.png37.35KB10.42KB▼ 72.11%
assets/images/pay-via-paga.png2.95KB2.33KB▼ 20.85%
assets/images/pay-with-paga.png5.74KB2.95KB▼ 48.59%
assets/images/paga-checkout-setting-page.png512.08KB134.95KB▼ 73.65%
assets/images/paga-checkout-payment-page.png2,925.75KB766.81KB▼ 73.79%