84% edxapay-for-woocommerce

Code Review | edxaPay

WordPress plugin edxaPay scored84%from 54 tests.

About plugin

  • Plugin page: edxapay-for-wooco...
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-6.2
  • WordPress version: 6.3.1
  • First release: May 5, 2022
  • Latest release: Apr 9, 2023
  • Number of updates: 10
  • Update frequency: every 34.0 days
  • Top authors: edxapay (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /232 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

Server-side resources used by edxaPay
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.35 ▼1.24
Dashboard /wp-admin3.31 ▼0.0359.63 ▼5.80
Posts /wp-admin/edit.php3.36 ▲0.0148.62 ▼1.77
Add New Post /wp-admin/post-new.php5.89 ▲0.0182.27 ▼19.23
Media Library /wp-admin/upload.php3.24 ▲0.0135.70 ▲0.81

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

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

Browser metrics Passed 4 tests

edxaPay: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.34 ▼1.061.77 ▼0.2843.76 ▲0.64
Dashboard /wp-admin2,203 ▲154.86 ▼0.99101.68 ▼16.9539.94 ▼3.46
Posts /wp-admin/edit.php2,086 ▼32.00 ▲0.0132.55 ▼4.3035.95 ▲3.79
Add New Post /wp-admin/post-new.php1,514 ▼717.44 ▼5.82691.44 ▲79.8556.70 ▼4.75
Media Library /wp-admin/upload.php1,388 ▼04.19 ▼0.0293.02 ▼7.5241.48 ▼1.13

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% from 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
Please take a closer look at the following
  • 1× 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/edxapay-for-woocommerce/src/edxapay.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: ewallet, touch n go, malaysia, payment gateway, online banking

edxapay-for-woocommerce/index.php 92% from 13 tests

The primary PHP file in "edxaPay" version 1.0.3 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("edxapay-for-woocommerce.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin203 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP26329203

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity36.00
▷ Minimum class complexity36.00
▷ Maximum class complexity36.00
Average method complexity6.00
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.30MB with 0.21MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
src/assets/mini.png57.20KB19.88KB▼ 65.25%
src/assets/wide.png120.80KB33.41KB▼ 72.34%
src/assets/tall.png129.66KB33.13KB▼ 74.45%