89% epicpay-woocommerce-payment-gateway

Code Review | EpicPay Payment Gateway for WooCommerce

WordPress plugin EpicPay Payment Gateway for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: epicpay-woocommer...
  • Plugin version: 1.0.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.5
  • WordPress version: 6.3.1
  • First release: May 29, 2019
  • Latest release: Sep 14, 2020
  • Number of updates: 13
  • Update frequency: every 36.7 days
  • Top authors: epicpaywp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /720 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼2.46ms] Passed 4 tests

This is a short check of server-side resources used by EpicPay Payment Gateway for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1342.61 ▲1.51
Dashboard /wp-admin3.43 ▲0.1251.91 ▼0.86
Posts /wp-admin/edit.php3.48 ▲0.1248.95 ▼1.63
Add New Post /wp-admin/post-new.php6.01 ▲0.1285.15 ▼4.21
Media Library /wp-admin/upload.php3.35 ▲0.1237.18 ▼3.12

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

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

Browser metrics Passed 4 tests

A check of browser resources used by EpicPay Payment Gateway for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.44 ▼0.121.72 ▼0.2343.77 ▼0.81
Dashboard /wp-admin2,195 ▲185.58 ▲0.0287.45 ▼0.3637.74 ▼2.62
Posts /wp-admin/edit.php2,100 ▼32.04 ▲0.0934.22 ▼8.3236.08 ▼1.47
Add New Post /wp-admin/post-new.php1,526 ▼023.57 ▲0.53653.73 ▼39.5752.36 ▼15.80
Media Library /wp-admin/upload.php1,403 ▲34.18 ▲0.00100.09 ▼7.8645.63 ▲0.56

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Congratulations! This plugin passed the SRP test

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

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes: The official readme.txt is a good inspiration

epicpay-woocommerce-payment-gateway/epicpay-woocommerce-gateway.php 77% from 13 tests

The main PHP file in "EpicPay Payment Gateway for WooCommerce" ver. 1.0.4 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("epicpay-woocommerce-payment-gateway.php" instead of "epicpay-woocommerce-gateway.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 200 characters long)
  • Requires at least: The required version number must match the one declared in readme.txt ("5.0.0" instead of "3.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected613 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP110687613

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity41.00
▷ Minimum class complexity41.00
▷ Maximum class complexity41.00
Average method complexity4.64
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected