84% woo-aggrepay

Code Review | AggrePay for WooCommerce

WordPress plugin AggrePay for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: woo-aggrepay
  • Plugin version: 1.0.9
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.7
  • WordPress version: 6.3.1
  • First release: Feb 12, 2019
  • Latest release: Jan 16, 2022
  • Number of updates: 30
  • Update frequency: every 35.6 days
  • Top authors: stefenros96 (90%)aggrepay (13.33%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /2,977 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼5.01ms] Passed 4 tests

This is a short check of server-side resources used by AggrePay for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0040.13 ▼2.36
Dashboard /wp-admin3.31 ▲0.0049.01 ▲0.41
Posts /wp-admin/edit.php3.36 ▲0.0050.22 ▲1.17
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.79 ▼18.12
Media Library /wp-admin/upload.php3.23 ▲0.0037.63 ▲0.04

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for AggrePay for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.24 ▲0.041.56 ▼0.2143.85 ▼0.69
Dashboard /wp-admin2,198 ▲215.62 ▲0.0290.09 ▲2.8841.20 ▼0.77
Posts /wp-admin/edit.php2,103 ▲32.03 ▲0.0238.82 ▲3.4035.81 ▼4.50
Add New Post /wp-admin/post-new.php1,526 ▼023.21 ▲0.15595.98 ▼57.3453.70 ▲3.03
Media Library /wp-admin/upload.php1,400 ▼34.18 ▼0.09100.80 ▼4.6543.93 ▲1.25

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

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 take a closer look at the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/woo-aggrepay/index.php on line 14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/woo-aggrepay/index.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

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: aggrepay, paymentgateway, payments, woocommerce, ecommerce...

woo-aggrepay/index.php 92% from 13 tests

The main PHP script in "AggrePay for WooCommerce" version 1.0.9 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("woo-aggrepay.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected308 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP15151308

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity29.00
▷ Minimum class complexity29.00
▷ Maximum class complexity29.00
Average method complexity4.11
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.04MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/aggrepay.png43.72KB14.30KB▼ 67.29%