99% payment-gateway-kassablanka

Code Review | Kassablanca

WordPress plugin Kassablanca scored 99% from 54 tests.

About plugin

  • Plugin page: payment-gateway-k...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.4-4.9.4
  • WordPress version: 5.8.1
  • First release: Apr 9, 2018
  • Latest release: May 3, 2018
  • Number of updates: 3
  • Update frequency: every 9.3 days
  • Top authors: b2cpl (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 576 total downloads

Benchmarks

Plugin footprint Passed 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.03MB] [CPU: ▼135.13ms] Passed 4 tests

Server-side resources used by Kassablanca
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.87 ▲0.1534.12 ▲12.01
Dashboard /wp-admin3.09 ▲0.0443.60 ▼0.02
Posts /wp-admin/edit.php3.15 ▲0.0447.30 ▲14.38
Add New Post /wp-admin/post-new.php5.46 ▲0.0392.94 ▼546.21
Media Library /wp-admin/upload.php3.04 ▲0.0330.78 ▼6.30

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Kassablanca
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10715.99 ▲0.438.34 ▼0.2450.78 ▲4.95
Dashboard /wp-admin2,970 ▲335.87 ▼0.17136.50 ▼5.73107.31 ▼12.00
Posts /wp-admin/edit.php2,739 ▼02.69 ▲0.0166.74 ▼2.9293.98 ▲5.50
Add New Post /wp-admin/post-new.php1,683 ▲1118.71 ▼0.13358.11 ▼8.49117.16 ▲11.58
Media Library /wp-admin/upload.php1,810 ▲35.04 ▼0.06153.42 ▼3.89117.50 ▼3.60

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstaller ran successfully

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

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 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Requires php: Invalid plugin version format
The official readme.txt might help

payment-gateway-kassablanka/wc_kassablanka.php 92% from 13 tests

The main PHP script in "Kassablanca" version 1.0.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("payment-gateway-kassablanka.php" instead of "wc_kassablanka.php")

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
Success! There were no dangerous files found in this plugin179 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP14131179

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity3.67
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
kassablanka.png4.56KB1.47KB▼ 67.72%