83% paystack-for-give

Code Review | Paystack Payment for Give

WordPress plugin Paystack Payment for Give scored83%from 54 tests.

About plugin

  • Plugin page: paystack-for-give
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.2
  • WordPress version: 6.3.1
  • First release: Jul 8, 2018
  • Latest release: Sep 25, 2023
  • Number of updates: 17
  • Update frequency: every 112.1 days
  • Top authors: paystack (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

1,000+ active /14,807 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.12MB] [CPU: ▼2.80ms] Passed 4 tests

Server-side resources used by Paystack Payment for Give
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1342.47 ▲0.04
Dashboard /wp-admin3.42 ▲0.1249.36 ▼2.68
Posts /wp-admin/edit.php3.54 ▲0.1856.71 ▲4.75
Add New Post /wp-admin/post-new.php6.02 ▲0.1493.90 ▼11.39
Media Library /wp-admin/upload.php3.35 ▲0.1241.15 ▲2.82

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 27 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Paystack Payment for Give: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,876 ▲11513.40 ▼0.877.96 ▲6.1245.20 ▼0.20
Dashboard /wp-admin2,199 ▲225.65 ▼0.0391.68 ▼8.2840.31 ▼6.14
Posts /wp-admin/edit.php2,104 ▲42.02 ▲0.0342.20 ▲4.1737.37 ▼4.22
Add New Post /wp-admin/post-new.php1,530 ▲423.29 ▲0.33678.13 ▼3.6458.09 ▲6.46
Media Library /wp-admin/upload.php1,404 ▲14.06 ▼0.18100.92 ▼18.6045.72 ▼6.61

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

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
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/paystack-for-give/admin/partials/paystack-give-admin-display.php
    • > /wp-content/plugins/paystack-for-give/public/partials/paystack-give-public-display.php

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Requires php: Invalid version format
  • Screenshots: Screenshot #1 (The slick Paystack settings panel.) image missing
The official readme.txt is a good inspiration

paystack-for-give/paystack-give.php 85% from 13 tests

This is the main PHP file of "Paystack Payment for Give" version 2.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("paystack-for-give.php" instead of "paystack-give.php")
  • 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 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected619 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP13191638560
Markdown115024
YAML13019
Dockerfile17310
JavaScript24546
CSS2080

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity3.22
▷ Minimum class complexity1.00
▷ Maximum class complexity18.00
Average method complexity1.56
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods38
▷ Static methods25.26%
▷ Public methods3386.84%
▷ Protected methods00.00%
▷ Private methods513.16%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.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