90% 8pay-payment-gateway

Code Review | 8Pay Payment Gateway

WordPress plugin 8Pay Payment Gateway scored90%from 54 tests.

About plugin

  • Plugin page: 8pay-payment-gateway
  • Plugin version: 1.1.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-5.7
  • WordPress version: 6.3.1
  • First release: Jul 9, 2021
  • Latest release: Aug 17, 2023
  • Number of updates: 31
  • Update frequency: every 24.8 days
  • Top authors: 8pay (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,114 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.02MB] [CPU: ▼6.29ms] Passed 4 tests

An overview of server-side resources used by 8Pay Payment Gateway
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.0243.66 ▲0.03
Dashboard /wp-admin3.59 ▲0.0249.72 ▼7.67
Posts /wp-admin/edit.php3.70 ▲0.0254.54 ▼1.87
Add New Post /wp-admin/post-new.php6.17 ▲0.0288.51 ▼15.65
Media Library /wp-admin/upload.php3.51 ▲0.0241.49 ▲3.76

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 49 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for 8Pay Payment Gateway
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲3514.27 ▼0.111.82 ▲0.0543.96 ▲3.36
Dashboard /wp-admin2,199 ▲195.54 ▼0.1588.76 ▼3.6342.76 ▼3.68
Posts /wp-admin/edit.php2,110 ▲71.98 ▼0.0546.66 ▲5.8433.11 ▼7.43
Add New Post /wp-admin/post-new.php1,552 ▲2123.45 ▲0.42681.36 ▼8.0053.78 ▼4.91
Media Library /wp-admin/upload.php1,404 ▲74.20 ▲0.01100.15 ▼9.7644.67 ▼2.08

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
3 plugin tags: crypto, payment, 8pay

8pay-payment-gateway/8pay-payment-gateway.php Passed 13 tests

This is the main PHP file of "8Pay Payment Gateway" version 1.1.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
46 characters long description:
Take crypto payments on your store using 8Pay.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected1,548 lines of code in 37 files:
LanguageFilesBlank linesComment linesLines of code
PHP212233061,391
SVG140296
CSS16034
JavaScript11027

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity6.53
▷ Minimum class complexity1.00
▷ Maximum class complexity35.00
Average method complexity2.93
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes19
▷ Abstract classes00.00%
▷ Concrete classes19100.00%
▷ Final classes00.00%
Methods43
▷ Static methods1534.88%
▷ Public methods43100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions436.36%
▷ Anonymous functions763.64%
Constants26
▷ Global constants519.23%
▷ Class constants2180.77%
▷ Public constants21100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
public/images/icon.png1.70KB1.51KB▼ 11.47%