74% payhow

Code Review | PAYHOW Checkout

WordPress plugin PAYHOW Checkout scored74%from 54 tests.

About plugin

  • Plugin page: payhow
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8.0-5.7
  • WordPress version: 6.3.1
  • First release: May 3, 2021
  • Latest release: May 20, 2021
  • Number of updates: 7
  • Update frequency: every 5.3 days
  • Top authors: payhow (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /492 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by PAYHOW Checkout
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.88 ▼0.82
Dashboard /wp-admin3.32 ▲0.0151.09 ▼0.34
Posts /wp-admin/edit.php3.37 ▲0.0151.27 ▲2.22
Add New Post /wp-admin/post-new.php5.90 ▲0.0196.00 ▼8.53
Media Library /wp-admin/upload.php3.24 ▲0.0137.29 ▲1.09

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for PAYHOW Checkout
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲7014.72 ▲0.371.85 ▲0.2540.17 ▼2.54
Dashboard /wp-admin2,197 ▲175.72 ▲0.1895.14 ▲6.9889.22 ▲46.96
Posts /wp-admin/edit.php2,120 ▲201.95 ▼0.0837.67 ▼0.0833.14 ▼4.70
Add New Post /wp-admin/post-new.php1,704 ▲17824.53 ▲1.06704.89 ▲41.3452.93 ▼11.37
Media Library /wp-admin/upload.php1,420 ▲204.18 ▼0.0499.66 ▼9.1978.00 ▲30.25

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/payhow/plugin.php+280
    Undefined index: wp_user_require_logon_checkout
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • 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
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following items
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/payhow/plugin.php:174
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/payhow/plugin.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_remote_post() in wp-content/plugins/payhow/Payhow.php:31
    • > PHP Warning
      include_once(ABSPATHwp-includes/pluggable.php): failed to open stream: No such file or directory in wp-content/plugins/payhow/plugin.php on line 12
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-includes/pluggable.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/payhow/plugin.php on line 12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
8 plugin tags: ame, checkout transparente, checkout, picpay, dropshipping checkout...

payhow/plugin.php 92% from 13 tests

Analyzing the main PHP file in "PAYHOW Checkout" version 1.0.1
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("payhow.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected381 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP36038265
JavaScript127765
CSS12051

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity8.50
▷ Minimum class complexity3.00
▷ Maximum class complexity14.00
Average method complexity2.22
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions1292.31%
▷ Anonymous functions17.69%
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
5 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon-fail.png0.44KB0.32KB▼ 25.56%
images/payhow_icon_menu.png1.27KB0.67KB▼ 47.58%
images/payhow_logo.png23.39KB9.70KB▼ 58.54%
images/icon-refresh.png1.42KB0.65KB▼ 54.08%
images/icon-success.png0.67KB0.42KB▼ 36.73%