83% premierpay

Code Review | PremierPay Payment Gateway

WordPress plugin PremierPay Payment Gateway scored83%from 54 tests.

About plugin

  • Plugin page: premierpay
  • Plugin version: 0.1.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Dec 24, 2022
  • Latest release: Dec 24, 2022
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: aishahersi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /144 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
This plugin's installer ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼7.54ms] Passed 4 tests

A check of server-side resources used by PremierPay Payment Gateway
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0134.85 ▼6.58
Dashboard /wp-admin3.31 ▼0.0443.84 ▼14.82
Posts /wp-admin/edit.php3.36 ▲0.0047.70 ▲3.57
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.52 ▼8.64
Media Library /wp-admin/upload.php3.24 ▲0.0031.28 ▼0.10

Server storage [IO: ▲0.02MB] [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: 10 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

PremierPay Payment Gateway: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.19 ▼1.111.99 ▲0.3238.27 ▼1.31
Dashboard /wp-admin2,209 ▲185.91 ▲0.01104.34 ▼11.2142.32 ▼2.85
Posts /wp-admin/edit.php2,089 ▼32.03 ▲0.0240.36 ▲3.6135.29 ▲4.60
Add New Post /wp-admin/post-new.php1,542 ▲2818.27 ▲0.75617.27 ▼26.2548.93 ▼0.55
Media Library /wp-admin/upload.php1,391 ▲34.24 ▼0.0295.71 ▼5.9844.55 ▲2.56

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/premierpay/includes/premierpay-checkout-page.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/premierpay/includes/premierpay-initial-setup.php:57

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% 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:
  • Tags: You are using too many tags: 15 tag instead of maximum 10
You can look at the official readme.txt

premierpay/premierpay.php 85% from 13 tests

"PremierPay Payment Gateway" version 0.1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("5.4" instead of "3.0")
  • Description: The description should be shorter than 140 characters (currently 277 characters long)

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
Success! There were no dangerous files found in this plugin485 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP8125167485

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity28.00
▷ Minimum class complexity28.00
▷ Maximum class complexity28.00
Average method complexity3.45
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods1090.91%
▷ Protected methods19.09%
▷ Private methods00.00%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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 were not PNG files found in your plugin