93% paybats

Code Review | PAYBATS

WordPress plugin PAYBATS scored 93% from 54 tests.

About plugin

  • Plugin page: paybats
  • Plugin version: 3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6.0-5.3
  • WordPress version: 5.8.1
  • First release: Dec 13, 2019
  • Latest release: Dec 13, 2019
  • Number of updates: 9
  • Update frequency: every 0.3 days
  • Top authors: paybats (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 222 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

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

This is a short check of server-side resources used by PAYBATS
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0130.01 ▼6.36
Dashboard /wp-admin3.07 ▲0.0138.75 ▼5.68
Posts /wp-admin/edit.php3.12 ▲0.0139.72 ▼4.63
Add New Post /wp-admin/post-new.php5.42 ▼0.0197.50 ▼561.48
Media Library /wp-admin/upload.php3.01 ▲0.0136.07 ▲1.55

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by PAYBATS
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,689 ▲9315.91 ▲0.3311.81 ▲1.2446.63 ▼0.86
Dashboard /wp-admin2,970 ▲365.97 ▼0.01144.86 ▼13.00132.66 ▲10.56
Posts /wp-admin/edit.php2,739 ▼02.72 ▼0.0072.01 ▲2.72102.71 ▲7.47
Add New Post /wp-admin/post-new.php1,683 ▼018.82 ▲0.13379.84 ▼17.79122.03 ▲2.64
Media Library /wp-admin/upload.php1,810 ▲35.04 ▲0.01165.88 ▲6.55124.51 ▲0.77

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/paybats/src/paybats.php:6

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

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === PAYBATS === )
The official readme.txt is a good inspiration

paybats/index.php 77% from 13 tests

The primary PHP file in "PAYBATS" version 3.1 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.3" instead of "2.6.0")
  • Main file name: The principal plugin file should be the same as the plugin slug ("paybats.php" instead of "index.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 153 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin189 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP25031189

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity27.00
▷ Minimum class complexity27.00
▷ Maximum class complexity27.00
Average method complexity4.71
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin