89% everypay-payment-gateway

Code Review | EveryPay Payment Gateway for WooCommerce

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

About plugin

  • Plugin page: everypay-payment-...
  • Plugin version: 3.5
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.7
  • WordPress version: 6.3.1
  • First release: Dec 18, 2020
  • Latest release: Apr 20, 2021
  • Number of updates: 23
  • Update frequency: every 5.4 days
  • Top authors: rigaseverypay (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /1,705 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: ▼6.54ms] Passed 4 tests

Analyzing server-side resources used by EveryPay Payment Gateway for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.44 ▼4.77
Dashboard /wp-admin3.32 ▼0.0249.39 ▼16.48
Posts /wp-admin/edit.php3.37 ▲0.0153.36 ▼3.75
Add New Post /wp-admin/post-new.php5.90 ▲0.01111.83 ▲2.93
Media Library /wp-admin/upload.php3.24 ▲0.0135.89 ▼1.16

Server storage [IO: ▲2.43MB] [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: 29 new files
Database: 2 new tables, 6 new options
New tables
wp_everypay_tokenization
wp_everypay_logging
New WordPress options
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for EveryPay Payment Gateway for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲5114.38 ▲0.231.63 ▼0.1042.92 ▼2.00
Dashboard /wp-admin2,203 ▲265.57 ▲0.0391.55 ▼7.0345.57 ▲1.20
Posts /wp-admin/edit.php2,108 ▲51.99 ▼0.0439.24 ▼1.5840.91 ▲4.14
Add New Post /wp-admin/post-new.php1,544 ▲1818.06 ▼4.94595.33 ▼23.7668.11 ▲13.63
Media Library /wp-admin/upload.php1,405 ▲54.15 ▼0.0299.23 ▼11.6048.71 ▲1.50

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

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)
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Contributors: The plugin contributors field is not present
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (EveryPay Payment Gateway plugin activation.), #2 (EveryPay Payment Gateway in WooCommerce payment methods), #3 (EveryPay Payment Gateway settings in WooCommerce), #4 (Everypay Payment Gateway 3ds2 iframe)
  • Tags: There are too many tags (18 tag instead of maximum 10)
You can take inspiration from this readme.txt

everypay-payment-gateway/everypay-payment-gateway.php Passed 13 tests

The entry point to "EveryPay Payment Gateway for WooCommerce" version 3.5 is a PHP file that has certain tags in its header comment area
107 characters long description:
This plugin adds a payment option in WooCommerce for customers to pay with their Credit Cards Via Everypay.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin1,534 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP10193154795
JavaScript6887424
CSS21210275
Markdown117040

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity9.22
▷ Minimum class complexity1.00
▷ Maximum class complexity29.00
Average method complexity2.35
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods55
▷ Static methods814.55%
▷ Public methods4683.64%
▷ Protected methods00.00%
▷ Private methods916.36%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
6 PNG files occupy 1.03MB with 0.73MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
wp_org_assets/Screenshot-1.png128.23KB36.42KB▼ 71.60%
wp_org_assets/Screenshot-3.png146.54KB46.41KB▼ 68.33%
images/everypay.png580.37KB67.04KB▼ 88.45%
wp_org_assets/Screenshot-2.png124.17KB37.48KB▼ 69.81%
wp_org_assets/Screenshot-4.png71.50KB30.28KB▼ 57.65%