84% pesapal-for-woocommerce

Code Review | Pesapal Gateway for Woocommerce

WordPress plugin Pesapal Gateway for Woocommerce scored84%from 54 tests.

About plugin

  • Plugin page: pesapal-for-wooco...
  • Plugin version: 2.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.9.2
  • WordPress version: 6.3.1
  • First release: Mar 11, 2013
  • Latest release: Jan 27, 2018
  • Number of updates: 17
  • Update frequency: every 104.9 days
  • Top authors: Jakeii (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

300+ active /8,185 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.09MB] [CPU: ▼5.00ms] Passed 4 tests

This is a short check of server-side resources used by Pesapal Gateway for Woocommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1033.58 ▼8.23
Dashboard /wp-admin3.40 ▲0.1044.33 ▼0.84
Posts /wp-admin/edit.php3.52 ▲0.1646.95 ▼0.36
Add New Post /wp-admin/post-new.php5.98 ▲0.0981.82 ▼10.57
Media Library /wp-admin/upload.php3.33 ▲0.0935.49 ▲2.19

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Pesapal Gateway for Woocommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4314.74 ▲0.161.72 ▼0.4040.80 ▼7.07
Dashboard /wp-admin2,206 ▲185.80 ▼0.08107.07 ▲8.7340.94 ▼4.86
Posts /wp-admin/edit.php2,089 ▲32.04 ▲0.0237.33 ▼0.6434.18 ▲0.39
Add New Post /wp-admin/post-new.php1,533 ▼023.49 ▲0.62677.91 ▲14.0163.25 ▲9.24
Media Library /wp-admin/upload.php1,388 ▼34.16 ▼0.0193.99 ▼4.1042.36 ▼5.72

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/pesapal-for-woocommerce/gateway.php:33

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: gateway, ecommerce, woocommerce, pesapal, payment

pesapal-for-woocommerce/gateway.php 92% from 13 tests

"Pesapal Gateway for Woocommerce" version 2.1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("pesapal-for-woocommerce.php" instead of "gateway.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected1,171 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP32783241,138
Markdown114033

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity11.38
▷ Minimum class complexity1.00
▷ Maximum class complexity40.00
Average method complexity2.65
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
Methods82
▷ Static methods1012.20%
▷ Public methods7186.59%
▷ Protected methods22.44%
▷ Private methods910.98%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
There were not PNG files found in your plugin