90% securepay-for-restrictcontentpro

Code Review | SecurePay For Restrict Content Pro

WordPress plugin SecurePay For Restrict Content Pro scored90%from 54 tests.

About plugin

  • Plugin page: securepay-for-res...
  • Plugin version: 1.0.4
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.3
  • WordPress version: 6.3.1
  • First release: Aug 18, 2021
  • Latest release: Sep 6, 2023
  • Number of updates: 16
  • Update frequency: every 46.8 days
  • Top authors: nawawijamili (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /789 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

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

This is a short check of server-side resources used by SecurePay For Restrict Content Pro
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0444.59 ▼3.71
Dashboard /wp-admin3.33 ▲0.0350.28 ▼5.92
Posts /wp-admin/edit.php3.38 ▲0.0349.13 ▼4.47
Add New Post /wp-admin/post-new.php5.91 ▲0.03101.72 ▼9.87
Media Library /wp-admin/upload.php3.26 ▲0.0338.13 ▲0.05

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 48 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for SecurePay For Restrict Content Pro
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲3914.73 ▲0.441.61 ▼0.0743.80 ▼1.17
Dashboard /wp-admin2,203 ▲315.63 ▼0.0390.79 ▼16.3641.60 ▼4.24
Posts /wp-admin/edit.php2,114 ▲141.99 ▲0.0341.67 ▼2.1438.23 ▲4.77
Add New Post /wp-admin/post-new.php1,543 ▲1717.98 ▼3.30597.75 ▼178.0459.39 ▼2.46
Media Library /wp-admin/upload.php1,405 ▲54.22 ▲0.04100.17 ▼10.9846.17 ▲0.71

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
No output text or server-side errors detected on direct access of PHP files

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 on the user side

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
5 plugin tags: fpx, payment platform, malaysia, payment gateway, online banking

securepay-for-restrictcontentpro/securepay-for-restrictcontentpro.php 92% from 13 tests

The principal PHP file in "SecurePay For Restrict Content Pro" v. 1.0.4 is loaded by WordPress automatically on each request
The following require your attention:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected786 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP513060708
CSS25040
JavaScript25138

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity54.00
▷ Minimum class complexity9.00
▷ Maximum class complexity99.00
Average method complexity5.50
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods26
▷ Static methods1142.31%
▷ Public methods1453.85%
▷ Protected methods00.00%
▷ Private methods1246.15%
Functions6
▷ Named functions00.00%
▷ Anonymous functions6100.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
29 PNG files occupy 0.15MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/admin/securepay-bank-alt.png55.21KB17.34KB▼ 68.59%
includes/admin/bnk/bkrm0602.png2.51KB1.57KB▼ 37.53%
includes/admin/bnk/scb0216.png4.63KB2.54KB▼ 45.01%
includes/admin/bnk/abmb0212.png2.70KB1.63KB▼ 39.49%
includes/admin/bnk/test0022.png2.88KB1.52KB▼ 47.23%