62% payza-payments

Code Review | Payza Payments

WordPress plugin Payza Payments scored62%from 54 tests.

About plugin

  • Plugin page: payza-payments
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-3.4.2
  • WordPress version: 6.3.1
  • First release: Nov 7, 2012
  • Latest release: Nov 7, 2012
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: hccoder (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,300 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼5.29ms] Passed 4 tests

Analyzing server-side resources used by Payza Payments
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0441.77 ▲3.66
Dashboard /wp-admin3.36 ▲0.0553.25 ▲1.84
Posts /wp-admin/edit.php3.41 ▲0.0547.85 ▼4.84
Add New Post /wp-admin/post-new.php5.94 ▲0.0585.85 ▼21.82
Media Library /wp-admin/upload.php3.28 ▲0.0542.60 ▲7.59
Shortcode /wp-admin/admin.php?page=payza-payments-shortcode3.2332.22
Help /wp-admin/admin.php?page=payza-payments-help3.2327.82
Payments history /wp-admin/admin.php?page=payza-payments-history3.2328.97
Configuration /wp-admin/admin.php?page=payza-payments-configuration3.2333.22
Payza /wp-admin/admin.php?page=payza-payments3.2329.89

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 24 new files
Database: 1 new table, 6 new options
New tables
hccoder_payza
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Payza Payments
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲6614.34 ▼0.011.67 ▲0.0643.19 ▼0.39
Dashboard /wp-admin2,227 ▲505.52 ▼0.1091.20 ▲1.2475.40 ▲32.77
Posts /wp-admin/edit.php2,135 ▲322.00 ▲0.0233.81 ▼10.3936.84 ▲1.08
Add New Post /wp-admin/post-new.php1,710 ▲18222.13 ▼1.01768.49 ▲51.9255.60 ▼3.88
Media Library /wp-admin/upload.php1,438 ▲384.07 ▼0.13110.39 ▲1.2484.15 ▲34.68
Shortcode /wp-admin/admin.php?page=payza-payments-shortcode8112.0129.8426.40
Help /wp-admin/admin.php?page=payza-payments-help8032.0024.3821.75
Payments history /wp-admin/admin.php?page=payza-payments-history8262.0024.7927.10
Configuration /wp-admin/admin.php?page=payza-payments-configuration9512.1824.3627.43
Payza /wp-admin/admin.php?page=payza-payments8422.0225.4627.23

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie tables detected upon uninstall: 1 table
    • hccoder_payza
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
    • > GET request to /wp-admin/admin.php?page=payza-payments-shortcode
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method HCCoder_PayzaAdmin::adminShortcode() should not be called statically
    • > GET request to /wp-admin/admin.php?page=payza-payments-help
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method HCCoder_PayzaAdmin::adminHelp() should not be called statically
    • > GET request to /wp-admin/admin.php?page=payza-payments-history
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method HCCoder_PayzaAdmin::adminHistory() should not be called statically
    • > GET request to /wp-admin/admin.php?page=payza-payments-configuration
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method HCCoder_PayzaAdmin::adminConfiguration() should not be called statically
    • > GET request to /wp-admin/admin.php?page=payza-payments
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method HCCoder_PayzaAdmin::adminIndex() should not be called statically

SRP 0% 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× PHP files output text when accessed directly:
    • > /wp-content/plugins/payza-payments/views/adminhistory.php
    • > /wp-content/plugins/payza-payments/views/adminhelp.php
  • 15× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Undefined variable: config in wp-content/plugins/payza-payments/views/adminconfiguration.php on line 5
    • > PHP Warning
      count(): Parameter must be an array or an object that implements Countable in wp-content/plugins/payza-payments/views/adminhistory.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to a member function getItem() on null in wp-content/plugins/payza-payments/views/adminhistoryedit.php:5
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/payza-payments/payza-payments.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/payza-payments/views/adminshortcode.php:4
    • > PHP Fatal error
      Uncaught Error: Call to a member function getItem() on null in wp-content/plugins/payza-payments/views/adminconfiguration.php:5
    • > PHP Fatal error
      require(): Failed opening required 'ABSPATHwp-content/plugins/payza-payments/classes/config.php' (include_path='.:/usr/share/php') in wp-content/plugins/payza-payments/payza-payments.php on line 11
    • > PHP Notice
      Undefined variable: rows in wp-content/plugins/payza-payments/views/adminhistory.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to a member function getItem() on null in wp-content/plugins/payza-payments/views/adminindex.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/payza-payments/views/frontendshortcode.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Screenshots: These screenshots require images: #1 (The configuration screen of Payza Payments), #2 (Shortcode support), #3 (Payments history), #4 (Payment details)
  • Donate link: Please fix this invalid URI: ""
The official readme.txt might help

payza-payments/payza-payments.php Passed 13 tests

"Payza Payments" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
54 characters long description:
Easy integration of Payza payments / AlertPay payments

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected564 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP1411286564

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity10.00
▷ Minimum class complexity4.00
▷ Maximum class complexity19.00
Average method complexity3.45
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes133.33%
Methods11
▷ Static methods218.18%
▷ Public methods1090.91%
▷ Protected methods00.00%
▷ Private methods19.09%
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
static/images/icon.png0.67KB0.60KB▼ 10.40%