83% set-corporate-paygateglobal

Code Review | SET Corporate MobilePay

WordPress plugin SET Corporate MobilePay scored 83% from 54 tests.

About plugin

  • Plugin page: set-corporate-pay...
  • Plugin version: 2.2.1
  • PHP compatiblity: 7+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.02
  • WordPress version: 6.3.1
  • First release: Mar 9, 2021
  • Latest release: Oct 16, 2022
  • Number of updates: 23
  • Update frequency: every 25.5 days
  • Top authors: elianodelaflor (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 784 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 successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by SET Corporate MobilePay
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.24 ▲1.87
Dashboard /wp-admin3.31 ▲0.0144.29 ▼0.40
Posts /wp-admin/edit.php3.36 ▲0.0043.35 ▼4.41
Add New Post /wp-admin/post-new.php5.89 ▲0.0178.64 ▼16.33
Media Library /wp-admin/upload.php3.23 ▲0.0034.47 ▲2.49

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for SET Corporate MobilePay
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.48 ▲0.101.74 ▼0.0642.99 ▼6.67
Dashboard /wp-admin2,209 ▲244.88 ▼0.9798.56 ▼1.0037.30 ▼8.77
Posts /wp-admin/edit.php2,086 ▼62.02 ▼0.0235.26 ▼5.6032.48 ▼4.13
Add New Post /wp-admin/post-new.php1,547 ▲3318.58 ▲1.14596.13 ▼48.2567.42 ▲14.38
Media Library /wp-admin/upload.php1,391 ▼04.23 ▼0.0193.63 ▼3.8143.66 ▲1.22

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/set-corporate-paygateglobal/SetCorporatePayGateGlobal.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Tags: There are too many tags (11 tag instead of maximum 10)
You can look at the official readme.txt

set-corporate-paygateglobal/SetCorporatePayGateGlobal.php 77% from 13 tests

"SET Corporate MobilePay" version 2.2.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Requires PHP: Required version number should use periods and dots only (ex. "7.0" instead of "7")
  • Description: The description should be shorter than 140 characters (currently 183 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("set-corporate-paygateglobal.php" instead of "SetCorporatePayGateGlobal.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
Good job! No executable or dangerous file extensions detected232 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP310085232

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions1292.31%
▷ Anonymous functions17.69%
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
2 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/PayGateGlobal_logo.PNG6.59KB2.95KB▼ 55.21%
assets/PayGateGlobal_logo.PNG6.59KB2.95KB▼ 55.21%