94% sepanet

Code Review | SEPA.net

WordPress plugin SEPA.net scored 94% from 54 tests.

About plugin

  • Plugin page: sepanet
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.8
  • WordPress version: 5.8.1
  • First release: Aug 1, 2017
  • Latest release: Aug 3, 2017
  • Number of updates: 23
  • Update frequency: every 1.6 days
  • Top authors: sepanet (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active / 1,367 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

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

Analyzing server-side resources used by SEPA.net
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1333.77 ▲5.44
Dashboard /wp-admin3.07 ▲0.0250.30 ▲6.51
Posts /wp-admin/edit.php3.12 ▲0.0241.71 ▼4.17
Add New Post /wp-admin/post-new.php5.43 ▼0.0090.43 ▼557.81
Media Library /wp-admin/upload.php3.01 ▲0.0134.65 ▲0.22

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

SEPA.net: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10715.75 ▲0.1411.14 ▲1.5446.90 ▼6.65
Dashboard /wp-admin2,967 ▲395.93 ▼0.02147.24 ▼46.02106.58 ▼5.08
Posts /wp-admin/edit.php2,739 ▲32.72 ▼0.0067.55 ▲1.2681.80 ▼8.08
Add New Post /wp-admin/post-new.php1,672 ▼018.78 ▼0.10362.23 ▼28.48104.62 ▲0.19
Media Library /wp-admin/upload.php1,810 ▲625.03 ▲0.02146.45 ▼12.89111.92 ▼1.15

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however 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
Please fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/sepanet/woocommerce-sepanet.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sepanet/woocommerce-sepanet-gateway.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Tags: There are too many tags (13 tag instead of maximum 10)
Please take inspiration from this readme.txt

sepanet/woocommerce-sepanet-gateway.php 92% from 13 tests

"SEPA.net" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("sepanet.php" instead of "woocommerce-sepanet-gateway.php")

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 plugin581 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP3170156559
JavaScript14022

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity27.00
▷ Minimum class complexity24.00
▷ Maximum class complexity30.00
Average method complexity3.60
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods20
▷ Static methods00.00%
▷ Public methods1890.00%
▷ Protected methods00.00%
▷ Private methods210.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin