80% vandar-paid-memberships-pro

Code Review | Vandar Payment Gateway for Paid Memberships Pro

WordPress plugin Vandar Payment Gateway for Paid Memberships Pro scored80%from 54 tests.

About plugin

  • Plugin page: vandar-paid-membe...
  • Plugin version: 2.1.2
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jun 13, 2020
  • Latest release: Aug 10, 2023
  • Number of updates: 7
  • Update frequency: every 165.3 days
  • Top authors: vandarpay (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /508 total downloads

Benchmarks

Plugin footprint 65% 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: ▼1.83MB] [CPU: ▼53.86ms] Passed 4 tests

Analyzing server-side resources used by Vandar Payment Gateway for Paid Memberships Pro
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.16 ▼1.305.41 ▼34.98
Dashboard /wp-admin2.18 ▼1.166.35 ▼54.65
Posts /wp-admin/edit.php2.19 ▼1.177.21 ▼39.76
Add New Post /wp-admin/post-new.php2.18 ▼3.706.98 ▼86.04
Media Library /wp-admin/upload.php2.18 ▼1.045.82 ▼27.58

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Vandar Payment Gateway for Paid Memberships Pro
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.34 ▼0.011.63 ▼0.0938.40 ▼1.34
Dashboard /wp-admin2,198 ▲215.63 ▼0.0489.97 ▼0.8542.75 ▲2.28
Posts /wp-admin/edit.php2,097 ▼32.02 ▲0.0940.41 ▲4.9937.45 ▼0.83
Add New Post /wp-admin/post-new.php1,526 ▼023.09 ▼0.11681.03 ▲18.0253.71 ▼1.41
Media Library /wp-admin/upload.php1,397 ▲34.21 ▲0.0493.73 ▼9.4142.19 ▼4.79

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin cannot be uninstalled
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, class 'PMProGateway_Vandar' not found
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: gateway, vandar, memberships, paid memberships pro, restrict content

vandar-paid-memberships-pro/vandar-paid-memberships-pro.php Passed 13 tests

The primary PHP file in "Vandar Payment Gateway for Paid Memberships Pro" version 2.1.2 is used by WordPress to initiate all plugin functionality
47 characters long description:
Vandar payment gateway for Paid Memberships Pro

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin407 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP19989367
Markdown18023
SVG10017

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity37.00
▷ Minimum class complexity37.00
▷ Maximum class complexity37.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods1191.67%
▷ Public methods1191.67%
▷ Protected methods00.00%
▷ Private methods18.33%
Functions2
▷ Named functions2100.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
4 PNG files occupy 0.14MB with 0.09MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-128x128.png3.06KB1.43KB▼ 53.35%
assets/icon-256x256.png6.66KB2.80KB▼ 58.00%
assets/banner-772x250.png31.88KB9.43KB▼ 70.41%
assets/banner-1544x500.png98.57KB24.42KB▼ 75.23%