89% woo-paymentsgy

Code Review | Payments.GY

WordPress plugin Payments.GY scored89%from 54 tests.

About plugin

  • Plugin page: woo-paymentsgy
  • Plugin version: 1.0.3
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.2.3
  • WordPress version: 6.3.1
  • First release: Feb 28, 2019
  • Latest release: Dec 27, 2019
  • Number of updates: 11
  • Update frequency: every 27.5 days
  • Top authors: carlhandy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /676 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 gracefully, with no errors

Server metrics [RAM: ▼0.01MB] [CPU: ▼6.80ms] Passed 4 tests

A check of server-side resources used by Payments.GY
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.51 ▲3.92
Dashboard /wp-admin3.31 ▼0.0441.78 ▼14.39
Posts /wp-admin/edit.php3.36 ▲0.0045.66 ▼2.06
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.86 ▼12.29
Media Library /wp-admin/upload.php3.23 ▲0.0034.27 ▲1.53

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Payments.GY
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲1814.09 ▼0.521.77 ▲0.0545.46 ▲2.22
Dashboard /wp-admin2,195 ▲145.55 ▼0.1284.85 ▼12.1038.44 ▼3.71
Posts /wp-admin/edit.php2,100 ▼02.02 ▼0.0132.73 ▼2.3434.92 ▼1.94
Add New Post /wp-admin/post-new.php1,526 ▼223.04 ▼0.01686.09 ▲4.8276.49 ▲25.82
Media Library /wp-admin/upload.php1,403 ▼04.19 ▲0.0194.22 ▼3.2143.24 ▼2.62

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
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • 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
The smoke test was a success, however most plugin functionality was not tested

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 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 ([https://i.ibb.co/n3102XL/main-screen.png Enter your application name, payments.gy email, password and select environment.]), #2 ([https://i.ibb.co/Bcxzfyc/registered.png Select the merchant wallet attached to your account to start accepting payments.])
The official readme.txt is a good inspiration

woo-paymentsgy/woopaymentsgy.php 85% from 13 tests

The entry point to "Payments.GY" version 1.0.3 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("woo-paymentsgy.php" instead of "woopaymentsgy.php")

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
No dangerous file extensions were detected1,608 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
JSON2001,113
PHP11105264429
Markdown124046
YAML13013
JavaScript1207

PHP code Passed 2 tests

A short review 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.32
Average class complexity8.20
▷ Minimum class complexity1.00
▷ Maximum class complexity35.00
Average method complexity2.80
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods20
▷ Static methods210.00%
▷ Public methods1995.00%
▷ Protected methods00.00%
▷ Private methods15.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/paymentsgy-logo.png12.80KB7.50KB▼ 41.45%
assets/images/paymentsgy-icon.png5.83KB3.49KB▼ 40.17%