84% campay-edd-payment-gateway

Code Review | CamPay EDD Payment Gateway

WordPress plugin CamPay EDD Payment Gateway scored84%from 54 tests.

About plugin

  • Plugin page: campay-edd-paymen...
  • Plugin version: 1.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.2
  • WordPress version: 6.3.1
  • First release: Jun 6, 2021
  • Latest release: Apr 11, 2023
  • Number of updates: 45
  • Update frequency: every 15.1 days
  • Top authors: campay (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,165 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.06MB] [CPU: ▼2.97ms] Passed 4 tests

Analyzing server-side resources used by CamPay EDD Payment Gateway
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0735.71 ▼4.45
Dashboard /wp-admin3.37 ▲0.0742.47 ▼9.42
Posts /wp-admin/edit.php3.42 ▲0.0645.78 ▲1.13
Add New Post /wp-admin/post-new.php5.95 ▲0.0688.13 ▲3.14
Media Library /wp-admin/upload.php3.30 ▲0.0632.53 ▲0.86

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for CamPay EDD Payment Gateway
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.17 ▼1.084.43 ▲2.0439.86 ▼8.46
Dashboard /wp-admin2,209 ▲215.86 ▲0.99107.12 ▼8.7441.01 ▼11.20
Posts /wp-admin/edit.php2,092 ▲32.06 ▲0.0743.00 ▲3.5036.45 ▼4.40
Add New Post /wp-admin/post-new.php1,541 ▲2723.34 ▲5.54609.33 ▼86.5148.48 ▼3.97
Media Library /wp-admin/upload.php1,382 ▼64.22 ▲0.0295.42 ▼15.3741.35 ▼2.59

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

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)
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 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: Call to undefined function plugin_dir_url() in wp-content/plugins/campay-edd-payment-gateway/campay_edd.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 on the user side

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
6 plugin tags: mtn money, payments, mobile money, orange money, edd...

campay-edd-payment-gateway/campay_edd.php 92% from 13 tests

The principal PHP file in "CamPay EDD Payment Gateway" v. 1.3 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("campay-edd-payment-gateway.php" instead of "campay_edd.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
There were no executable files found in this plugin582 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP113947400
CSS1106141
JavaScript112441

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity42.00
▷ Minimum class complexity42.00
▷ Maximum class complexity42.00
Average method complexity3.73
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods15
▷ Static methods16.67%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/momo-om.png2.79KB1.74KB▼ 37.87%