83% slimcd-payment-gateway

Code Review | Slim CD payment gateway

WordPress plugin Slim CD payment gateway scored83%from 54 tests.

About plugin

  • Plugin page: slimcd-payment-ga...
  • Plugin version: 1.0.3
  • PHP compatiblity: 7.0.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.0-6.2
  • WordPress version: 6.3.1
  • First release: Jun 29, 2021
  • Latest release: Aug 21, 2023
  • Number of updates: 24
  • Update frequency: every 32.7 days
  • Top authors: slimcd (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /594 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼0.99ms] Passed 4 tests

Analyzing server-side resources used by Slim CD payment gateway
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.15 ▼3.20
Dashboard /wp-admin3.31 ▲0.0166.32 ▲12.98
Posts /wp-admin/edit.php3.36 ▲0.0048.80 ▲1.81
Add New Post /wp-admin/post-new.php5.89 ▲0.0097.26 ▼2.93
Media Library /wp-admin/upload.php3.23 ▲0.0037.67 ▲0.35

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Slim CD payment gateway
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.17 ▼1.481.66 ▼0.1037.41 ▼14.92
Dashboard /wp-admin2,206 ▲184.87 ▼1.03104.04 ▼10.9237.64 ▼6.26
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0336.07 ▲0.5432.50 ▼2.83
Add New Post /wp-admin/post-new.php1,514 ▼1417.50 ▼0.72621.67 ▲34.3659.59 ▲2.05
Media Library /wp-admin/upload.php1,388 ▼04.20 ▼0.0494.55 ▼7.2339.99 ▼6.18

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/slimcd-payment-gateway/includes/class-slimcd-payment-gateway.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

slimcd-payment-gateway/slimcd-payment-for-woocommerce.php 85% from 13 tests

The primary PHP file in "Slim CD payment gateway" version 1.0.3 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 175 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("slimcd-payment-gateway.php" instead of "slimcd-payment-for-woocommerce.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin656 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP511368574
JavaScript14056
CSS15026

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.40
Average class complexity36.00
▷ Minimum class complexity36.00
▷ Maximum class complexity36.00
Average method complexity4.18
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods981.82%
▷ Protected methods00.00%
▷ Private methods218.18%
Functions9
▷ Named functions9100.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
4 PNG files occupy 0.07MB with 0.04MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/icon2.png18.33KB6.01KB▼ 67.20%
assets/images/powered-by-SlimCd.png10.35KB4.72KB▼ 54.39%
assets/images/icon1.png31.10KB6.02KB▼ 80.64%
assets/images/icon.png10.35KB4.72KB▼ 54.39%