74% axokey-gateway

Code Review | Axokey Gateway

WordPress plugin Axokey Gateway scored74%from 54 tests.

About plugin

  • Plugin page: axokey-gateway
  • Plugin version: 1.4.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.7
  • WordPress version: 6.3.1
  • First release: Oct 10, 2020
  • Latest release: Mar 29, 2021
  • Number of updates: 41
  • Update frequency: every 4.2 days
  • Top authors: francoismarie (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /639 total downloads

Benchmarks

Plugin footprint 65% 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: ▼2.18MB] [CPU: ▼59.42ms] Passed 4 tests

A check of server-side resources used by Axokey Gateway
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.09 ▼1.655.47 ▼39.90
Dashboard /wp-admin2.11 ▼1.465.52 ▼52.18
Posts /wp-admin/edit.php2.11 ▼1.576.20 ▼44.20
Add New Post /wp-admin/post-new.php2.11 ▼4.048.27 ▼101.38
Media Library /wp-admin/upload.php2.11 ▼1.385.38 ▼31.33

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
recovery_mode_email_last_sent
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Axokey Gateway
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /1,475 ▼1,28612.42 ▼2.391.94 ▲0.2742.71 ▼1.68
Dashboard /wp-admin864 ▼1,3161.38 ▼4.3515.78 ▼76.3423.50 ▼20.59
Posts /wp-admin/edit.php875 ▼1,2281.53 ▼0.487.29 ▼28.9321.71 ▼13.01
Add New Post /wp-admin/post-new.php599 ▼9411.73 ▼21.2420.18 ▼653.256.90 ▼49.95
Media Library /wp-admin/upload.php760 ▼6371.73 ▼2.4423.67 ▼77.0724.22 ▼24.41

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the axokey_notify handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • recovery_mode_email_last_sent
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

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
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/axokey-gateway/axokey-payment.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
9 plugin tags: woocommerce, axokey, card, credit card, payment...

axokey-gateway/axokey-payment.php 92% from 13 tests

The main file in "Axokey Gateway" v. 1.4.1 serves as a complement to information provided in readme.txt and as the entry point to the 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 ("axokey-gateway.php" instead of "axokey-payment.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected604 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP391168468
CSS11183
JSON17038
Markdown19015

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity8.00
▷ Minimum class complexity1.00
▷ Maximum class complexity14.00
Average method complexity1.88
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods24
▷ Static methods14.17%
▷ Public methods2083.33%
▷ Protected methods14.17%
▷ Private methods312.50%
Functions6
▷ Named functions6100.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
1 PNG file occupies 0.02MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/logo.png25.04KB9.48KB▼ 62.16%