84% ultimate-membership-pro-payfast

Code Review | Ultimate Membership Pro - PayFast

WordPress plugin Ultimate Membership Pro - PayFast scored84%from 54 tests.

About plugin

  • Plugin page: ultimate-membersh...
  • Plugin version: 1.3
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1.1-6.2
  • WordPress version: 6.3.1
  • First release: Oct 24, 2022
  • Latest release: Apr 20, 2023
  • Number of updates: 12
  • Update frequency: every 15.1 days
  • Top authors: wpindeed (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,264 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼7.82ms] Passed 4 tests

Analyzing server-side resources used by Ultimate Membership Pro - PayFast
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1045.75 ▲4.13
Dashboard /wp-admin3.39 ▲0.0946.44 ▼6.37
Posts /wp-admin/edit.php3.51 ▲0.1549.98 ▲2.82
Add New Post /wp-admin/post-new.php5.97 ▲0.0982.11 ▼29.64
Media Library /wp-admin/upload.php3.32 ▲0.0937.62 ▲1.90

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 41 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
db_upgraded
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Ultimate Membership Pro - PayFast
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4713.20 ▼1.184.68 ▲2.5340.61 ▼7.28
Dashboard /wp-admin2,213 ▲254.82 ▼0.07108.32 ▼2.4539.36 ▼6.23
Posts /wp-admin/edit.php2,092 ▲32.04 ▲0.0739.01 ▼0.0337.68 ▲3.65
Add New Post /wp-admin/post-new.php1,537 ▲1723.38 ▲0.33680.62 ▲52.5557.23 ▼2.20
Media Library /wp-admin/upload.php1,386 ▼24.28 ▲0.1397.83 ▼0.7841.68 ▼1.43

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 does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Please fix the following items
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ihc_check_payment_status() in wp-content/plugins/ultimate-membership-pro-payfast/views/box.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/ultimate-membership-pro-payfast/views/admin.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/ultimate-membership-pro-payfast/views/form.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'Indeed\\Ihc\\Gateways\\PaymentAbstract' not found in wp-content/plugins/ultimate-membership-pro-payfast/classes/PayFast.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/ultimate-membership-pro-payfast/ultimate-membership-pro-payfast.php:18

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)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: Add images for these screenshots: #1 (Addon activated), #2 (Order from the list of payment tools), #3 (Payfast activated in Payment Services)
You can look at the official readme.txt

ultimate-membership-pro-payfast/ultimate-membership-pro-payfast.php 92% from 13 tests

The main PHP file in "Ultimate Membership Pro - PayFast" ver. 1.3 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 142 characters long)

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
There were no executable files found in this plugin1,316 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP182334921,251
CSS282042
SVG10012
JSON10011

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity15.89
▷ Minimum class complexity1.00
▷ Maximum class complexity48.00
Average method complexity3.27
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods61
▷ Static methods1016.39%
▷ Public methods5996.72%
▷ Protected methods00.00%
▷ Private methods23.28%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/ump_payfast.png11.07KB5.94KB▼ 46.36%