90% securepay

Code Review | SecurePay For WooCommerce

WordPress plugin SecurePay For WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: securepay
  • Plugin version: 1.0.18
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.3
  • WordPress version: 6.3.1
  • First release: May 5, 2020
  • Latest release: Sep 6, 2023
  • Number of updates: 50
  • Update frequency: every 24.4 days
  • Top authors: nawawijamili (72%)securepay (30%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active /4,455 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼1.27ms] Passed 4 tests

An overview of server-side resources used by SecurePay For WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0442.42 ▲1.81
Dashboard /wp-admin3.34 ▲0.0357.17 ▲6.84
Posts /wp-admin/edit.php3.45 ▲0.0954.35 ▲0.17
Add New Post /wp-admin/post-new.php5.92 ▲0.0388.60 ▼4.75
Media Library /wp-admin/upload.php3.26 ▲0.0339.05 ▼2.32

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

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

Browser metrics Passed 4 tests

SecurePay For WooCommerce: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲1414.32 ▲0.042.27 ▲0.1047.61 ▲7.06
Dashboard /wp-admin2,206 ▲325.51 ▼0.1687.55 ▼29.5438.30 ▼20.68
Posts /wp-admin/edit.php2,111 ▲112.01 ▲0.0137.48 ▼1.1437.84 ▲5.14
Add New Post /wp-admin/post-new.php1,532 ▲623.37 ▲0.37679.75 ▼18.7052.41 ▼0.39
Media Library /wp-admin/upload.php1,405 ▲54.24 ▲0.0396.95 ▼23.8044.17 ▼3.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
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: malaysia, payment platform, fpx, payment gateway, online banking

securepay/securepay.php Passed 13 tests

The main PHP file in "SecurePay For WooCommerce" ver. 1.0.18 adds more information about the plugin and also serves as the entry point for this plugin
54 characters long description:
Plugin for SecurePay payment platform with WooCommerce

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
Good job! No executable or dangerous file extensions detected1,005 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP414048718
JavaScript4173159
SVG202105
CSS24023

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity49.50
▷ Minimum class complexity13.00
▷ Maximum class complexity86.00
Average method complexity4.23
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods30
▷ Static methods1033.33%
▷ Public methods1756.67%
▷ Protected methods00.00%
▷ Private methods1343.33%
Functions8
▷ Named functions00.00%
▷ Anonymous functions8100.00%
Constants10
▷ Global constants10100.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
31 PNG files occupy 0.22MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/admin/bnk/scb0216.png4.63KB2.54KB▼ 45.01%
includes/admin/bnk/abb0233.png3.99KB2.19KB▼ 45.11%
includes/admin/securepay-bank-alt.png55.21KB17.34KB▼ 68.59%
includes/admin/bnk/cit0219.png2.11KB1.30KB▼ 38.58%
includes/admin/bnk/abmb0212.png2.70KB1.63KB▼ 39.49%