84% alias-pay-woocommerce-gateway

Code Review | Alias Pay

WordPress plugin Alias Pay scored84%from 54 tests.

About plugin

  • Plugin page: alias-pay-woocomm...
  • Plugin version: 1.0
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1+
  • WordPress version: 6.3.1
  • First release: Apr 8, 2018
  • Latest release: Jul 18, 2018
  • Number of updates: 8
  • Update frequency: every 13.3 days
  • Top authors: makeen (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /657 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Alias Pay
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.70 ▼2.46
Dashboard /wp-admin3.31 ▲0.0145.60 ▼6.83
Posts /wp-admin/edit.php3.36 ▲0.0048.06 ▼1.01
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.74 ▼10.24
Media Library /wp-admin/upload.php3.23 ▲0.0032.15 ▼4.23

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Alias Pay
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.34 ▼0.011.87 ▲0.1639.55 ▼5.64
Dashboard /wp-admin2,195 ▲155.62 ▲0.0191.49 ▼5.1240.73 ▼5.74
Posts /wp-admin/edit.php2,097 ▼62.01 ▼0.1539.18 ▲3.1038.20 ▲0.55
Add New Post /wp-admin/post-new.php1,526 ▼223.15 ▲0.08692.95 ▼6.1560.41 ▲8.02
Media Library /wp-admin/upload.php1,397 ▼34.19 ▲0.01101.35 ▼3.5943.66 ▼3.95

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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/alias-pay-woocommerce-gateway/aliaspay_gateway_class.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/alias-pay-woocommerce-gateway/aliaspay_woocomerce_payment_gateway.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Tested up to: Version format is invalid
You can take inspiration from this readme.txt

alias-pay-woocommerce-gateway/aliaspay_woocomerce_payment_gateway.php 92% from 13 tests

Analyzing the main PHP file in "Alias Pay" version 1.0
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("alias-pay-woocommerce-gateway.php" instead of "aliaspay_woocomerce_payment_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 plugin149 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP23858149

PHP code Passed 2 tests

A brief analysis 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.21
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.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
PNG images were not found in this plugin