83% lsx-give-payfast-gateway

Code Review | LSX PayFast Gateway for Give

WordPress plugin LSX PayFast Gateway for Give scored83%from 54 tests.

About plugin

  • Plugin page: lsx-give-payfast-...
  • Plugin version: 1.2.8
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.3
  • WordPress version: 6.3.1
  • First release: Nov 29, 2018
  • Latest release: Aug 11, 2023
  • Number of updates: 18
  • Update frequency: every 95.4 days
  • Top authors: feedmymedia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /4,343 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼4.44ms] Passed 4 tests

Server-side resources used by LSX PayFast Gateway for Give
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0639.40 ▼5.09
Dashboard /wp-admin3.36 ▲0.0649.53 ▼5.72
Posts /wp-admin/edit.php3.41 ▲0.0548.35 ▲0.19
Add New Post /wp-admin/post-new.php5.94 ▲0.0581.90 ▼5.22
Media Library /wp-admin/upload.php3.28 ▲0.0536.15 ▼1.74

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for LSX PayFast Gateway for Give
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▼0.031.63 ▼0.3240.83 ▼1.51
Dashboard /wp-admin2,192 ▲155.53 ▼0.0581.34 ▼17.8737.98 ▼7.31
Posts /wp-admin/edit.php2,097 ▼31.99 ▼0.0333.08 ▼1.4235.25 ▼0.93
Add New Post /wp-admin/post-new.php1,526 ▼223.20 ▲0.22684.82 ▼11.9343.64 ▼10.30
Media Library /wp-admin/upload.php1,400 ▼04.18 ▲0.0396.96 ▼5.0243.52 ▼0.97

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/lsx-give-payfast-gateway/give-payfast.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 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
5 plugin tags: lsx, payment gateway, donations, payfast, givewp

lsx-give-payfast-gateway/give-payfast.php 77% from 13 tests

The entry point to "LSX PayFast Gateway for Give" version 1.2.8 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Description: Please keep the plugin description shorter than 140 characters (currently 235 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("lsx-give-payfast-gateway.php" instead of "give-payfast.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin752 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP2103139433
YAML450185
Markdown253090
XML113944

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity36.00
▷ Minimum class complexity36.00
▷ Maximum class complexity36.00
Average method complexity6.83
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin