89% perk-exchange-payment-gateway

Code Review | Perk.Exchange Payment Gateway

WordPress plugin Perk.Exchange Payment Gateway scored89%from 54 tests.

About plugin

  • Plugin page: perk-exchange-pay...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.9.3
  • WordPress version: 6.3.1
  • First release: Jan 25, 2022
  • Latest release: May 22, 2022
  • Number of updates: 13
  • Update frequency: every 9.0 days
  • Top authors: perkexchange (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /638 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.05MB] [CPU: ▼3.39ms] Passed 4 tests

An overview of server-side resources used by Perk.Exchange Payment Gateway
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0538.37 ▼3.37
Dashboard /wp-admin3.35 ▲0.0548.26 ▼6.28
Posts /wp-admin/edit.php3.40 ▲0.0549.85 ▲0.08
Add New Post /wp-admin/post-new.php5.93 ▲0.0596.31 ▼3.97
Media Library /wp-admin/upload.php3.28 ▲0.0536.68 ▲0.91

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Perk.Exchange Payment Gateway
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.34 ▲0.131.66 ▲0.0343.03 ▲2.28
Dashboard /wp-admin2,195 ▲205.61 ▼0.0183.69 ▼21.7041.32 ▲4.26
Posts /wp-admin/edit.php2,100 ▼01.99 ▲0.0139.51 ▼0.4336.26 ▼1.47
Add New Post /wp-admin/post-new.php1,535 ▲918.37 ▼5.11645.69 ▼8.7063.55 ▲8.68
Media Library /wp-admin/upload.php1,403 ▲34.15 ▼0.07108.04 ▼3.6545.48 ▲1.07

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
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

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

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === perk-exchange-payment-gateway === )
You can take inspiration from this readme.txt

perk-exchange-payment-gateway/perk-exchange.php 69% from 13 tests

The primary PHP file in "Perk.Exchange Payment Gateway" version 1.0.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Requires PHP: Required version does not match the one declared in readme.txt ("7.0" instead of "7.2")
  • Requires at least: Required version does not match the one declared in readme.txt ("5.8" instead of "5.2")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("perk-exchange-payment-gateway.php" instead of "perk-exchange.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
No dangerous file extensions were detected398 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP14773353
Markdown124045

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity18.00
▷ Minimum class complexity18.00
▷ Maximum class complexity18.00
Average method complexity2.70
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin