83% paystack-add-on-for-gravity-forms

Code Review | Paystack Add-On for Gravity Forms

WordPress plugin Paystack Add-On for Gravity Forms scored83%from 54 tests.

About plugin

  • Plugin page: paystack-add-on-f...
  • Plugin version: 2.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-6.2
  • WordPress version: 6.3.1
  • First release: Jan 22, 2021
  • Latest release: Oct 5, 2023
  • Number of updates: 9
  • Update frequency: every 109.8 days
  • Top authors: paystack (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

300+ active /2,790 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by Paystack Add-On for Gravity Forms
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0042.11 ▼4.43
Dashboard /wp-admin3.31 ▲0.0047.03 ▼6.70
Posts /wp-admin/edit.php3.36 ▲0.0051.89 ▲1.69
Add New Post /wp-admin/post-new.php5.89 ▲0.0096.18 ▼2.66
Media Library /wp-admin/upload.php3.23 ▲0.0035.87 ▼2.73

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Paystack Add-On for Gravity Forms
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.69 ▲0.471.80 ▼0.3643.46 ▲0.19
Dashboard /wp-admin2,195 ▲185.57 ▼0.0787.13 ▼14.6337.64 ▼4.38
Posts /wp-admin/edit.php2,100 ▼01.99 ▼0.0141.03 ▲3.8635.45 ▲1.26
Add New Post /wp-admin/post-new.php1,535 ▲918.36 ▼4.75597.21 ▼62.7561.52 ▲3.01
Media Library /wp-admin/upload.php1,397 ▼64.22 ▲0.04104.20 ▲2.0944.59 ▲0.64

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

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
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/paystack-add-on-for-gravity-forms/class-gf-paystack-api.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Requires php: Invalid plugin version format
Please take inspiration from this readme.txt

paystack-add-on-for-gravity-forms/paystack.php 77% from 13 tests

The entry point to "Paystack Add-On for Gravity Forms" version 2.0.1 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("paystack-add-on-for-gravity-forms.php" instead of "paystack.php")
  • Domain Path: The domain path points to a folder that does not exist ("/languages")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin1,123 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP33557301,105
Markdown17018

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity45.67
▷ Minimum class complexity2.00
▷ Maximum class complexity130.00
Average method complexity3.91
▷ Minimum method complexity1.00
▷ Maximum method complexity45.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods46
▷ Static methods24.35%
▷ Public methods46100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
1 PNG file occupies 0.09MB with 0.07MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/screenshot-paystack-settings.png95.05KB27.30KB▼ 71.28%