84% postepay-woocommerce-gateway

Code Review | Postepay Gateway per Woocommerce

WordPress plugin Postepay Gateway per Woocommerce scored 84% from 54 tests.

About plugin

  • Plugin page: postepay-woocomme...
  • Plugin version: 5.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-4.9.6
  • WordPress version: 6.3.1
  • First release: Mar 8, 2012
  • Latest release: Jun 28, 2018
  • Number of updates: 17
  • Update frequency: every 135.5 days
  • Top authors: molokom (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

1,000+ active / 11,885 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

Server-side resources used by Postepay Gateway per Woocommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.70 ▼0.23
Dashboard /wp-admin3.31 ▲0.0047.47 ▲0.39
Posts /wp-admin/edit.php3.36 ▲0.0053.59 ▲5.98
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.72 ▼13.34
Media Library /wp-admin/upload.php3.23 ▲0.0033.67 ▲0.95

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

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

Browser metrics Passed 4 tests

Postepay Gateway per Woocommerce: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.30 ▼1.081.68 ▼0.0442.96 ▲0.72
Dashboard /wp-admin2,203 ▲125.77 ▲0.7496.99 ▼4.6540.64 ▼0.80
Posts /wp-admin/edit.php2,093 ▲42.04 ▲0.0145.25 ▲4.1639.63 ▲5.13
Add New Post /wp-admin/post-new.php1,520 ▲123.63 ▲0.36645.55 ▼7.7550.82 ▼14.97
Media Library /wp-admin/upload.php1,388 ▼34.19 ▼0.1395.85 ▼9.3243.40 ▼6.08

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/postepay-woocommerce-gateway/wc-postepay.php:11

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 your attention:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === postepay-woocommerce-gateway === )
You can look at the official readme.txt

postepay-woocommerce-gateway/wc-postepay.php 92% from 13 tests

The main PHP file in "Postepay Gateway per Woocommerce" ver. 5.1 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("postepay-woocommerce-gateway.php" instead of "wc-postepay.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
There were no executable files found in this plugin118 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13939118

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity7.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

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