89% woocommerce-expresspay-payment-gateway

Code Review | ExpressPay Woocommerce Payment Gateway

WordPress plugin ExpressPay Woocommerce Payment Gateway scored 89% from 54 tests.

About plugin

  • Plugin page: woocommerce-expre...
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.4.1
  • WordPress version: 6.3.1
  • First release: Apr 2, 2015
  • Latest release: Jan 15, 2016
  • Number of updates: 37
  • Update frequency: every 18.3 days
  • Top authors: elnino.akin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 6,346 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by ExpressPay Woocommerce Payment Gateway
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.48 ▼4.59
Dashboard /wp-admin3.31 ▲0.0045.18 ▼6.34
Posts /wp-admin/edit.php3.36 ▲0.0045.61 ▼2.69
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.31 ▼8.25
Media Library /wp-admin/upload.php3.23 ▲0.0036.30 ▲2.01

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

ExpressPay Woocommerce Payment Gateway: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.23 ▼1.171.83 ▲0.2640.80 ▼4.33
Dashboard /wp-admin2,206 ▲155.76 ▲0.7097.38 ▼4.9038.70 ▼2.71
Posts /wp-admin/edit.php2,089 ▼02.04 ▼0.0138.65 ▼1.5834.36 ▼1.80
Add New Post /wp-admin/post-new.php1,514 ▼017.49 ▲0.02634.41 ▼34.2449.64 ▲0.45
Media Library /wp-admin/upload.php1,388 ▼04.18 ▲0.0396.64 ▼3.8541.74 ▼2.49

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

Smoke tests Passed 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 Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

woocommerce-expresspay-payment-gateway/expresspay-woocommere-gateway.php 92% from 13 tests

The entry point to "ExpressPay Woocommerce Payment Gateway" version 2.0.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("woocommerce-expresspay-payment-gateway.php" instead of "expresspay-woocommere-gateway.php")

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
Everything looks great! No dangerous files found in this plugin366 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP14717348
JavaScript10018

PHP code Passed 2 tests

This is a short overview 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.19
Average class complexity31.00
▷ Minimum class complexity31.00
▷ Maximum class complexity31.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods15
▷ Static methods426.67%
▷ Public methods1493.33%
▷ Protected methods16.67%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
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 compressed PNG file occupies 0.01MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/logo.png6.67KB6.83KB0.00%