84% paystack-gateway-paid-memberships-pro

Code Review | Paystack Gateway for Paid Membership Pro

WordPress plugin Paystack Gateway for Paid Membership Pro scored84%from 54 tests.

About plugin

  • Plugin page: paystack-gateway-...
  • Plugin version: 1.7.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: May 8, 2018
  • Latest release: Sep 27, 2023
  • Number of updates: 22
  • Update frequency: every 107.4 days
  • Top authors: paystack (81.82%)andrewza (22.73%)

Code review

54 tests

User reviews

3 reviews

Install metrics

700+ active /15,386 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
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▲0.22ms] Passed 4 tests

A check of server-side resources used by Paystack Gateway for Paid Membership Pro
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0037.65 ▼6.14
Dashboard /wp-admin3.31 ▲0.0061.04 ▲18.69
Posts /wp-admin/edit.php3.42 ▲0.0751.64 ▲7.76
Add New Post /wp-admin/post-new.php5.89 ▲0.0099.58 ▲1.15
Media Library /wp-admin/upload.php3.23 ▲0.0034.21 ▼1.89

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Paystack Gateway for Paid Membership Pro
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.34 ▲0.191.63 ▼0.5643.77 ▼0.77
Dashboard /wp-admin2,195 ▲155.59 ▼0.0892.57 ▲3.7245.20 ▲9.58
Posts /wp-admin/edit.php2,103 ▼02.04 ▲0.0346.99 ▲6.4436.15 ▼1.30
Add New Post /wp-admin/post-new.php1,526 ▼023.33 ▲0.40686.60 ▲47.9763.96 ▲14.72
Media Library /wp-admin/upload.php1,400 ▼04.23 ▲0.0695.61 ▲3.5039.85 ▼1.15

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/paystack-gateway-paid-memberships-pro/class.pmprogateway_paystack.php:14

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Screenshots: Screenshot #1 (The slick Paystack settings panel.) image not found
The official readme.txt is a good inspiration

paystack-gateway-paid-memberships-pro/class.pmprogateway_paystack.php 92% from 13 tests

The entry point to "Paystack Gateway for Paid Membership Pro" version 1.7.1 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("paystack-gateway-paid-memberships-pro.php" instead of "class.pmprogateway_paystack.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
No dangerous file extensions were detected1,187 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP2159141768
CSS14620368
PO File1192151

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.32
Average class complexity58.50
▷ Minimum class complexity1.00
▷ Maximum class complexity116.00
Average method complexity6.00
▷ Minimum method complexity1.00
▷ Maximum method complexity37.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods23
▷ Static methods1565.22%
▷ Public methods23100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin