83% payzee-payment-gateway

Code Review | Payzee

WordPress plugin Payzee scored83%from 54 tests.

About plugin

  • Plugin page: payzee-payment-ga...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.6
  • WordPress version: 6.3.1
  • First release: Jan 22, 2021
  • Latest release: Sep 7, 2021
  • Number of updates: 9
  • Update frequency: every 25.6 days
  • Top authors: payzee (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /665 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
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼8.13ms] Passed 4 tests

This is a short check of server-side resources used by Payzee
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.26 ▼2.25
Dashboard /wp-admin3.33 ▼0.0144.56 ▼18.82
Posts /wp-admin/edit.php3.38 ▲0.0344.92 ▲1.69
Add New Post /wp-admin/post-new.php5.91 ▲0.0386.63 ▼13.13
Media Library /wp-admin/upload.php3.26 ▲0.0335.07 ▲4.45

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Payzee
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.59 ▼0.711.66 ▼0.2339.64 ▼5.05
Dashboard /wp-admin2,206 ▲184.86 ▼1.02109.70 ▲11.7142.61 ▲3.92
Posts /wp-admin/edit.php2,086 ▼32.02 ▼0.0439.92 ▲0.4634.84 ▼0.77
Add New Post /wp-admin/post-new.php1,533 ▼923.36 ▲5.18603.28 ▼12.7749.82 ▼6.13
Media Library /wp-admin/upload.php1,382 ▼04.18 ▲0.0296.36 ▼2.5740.41 ▼2.51

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/payzee-payment-gateway/payzee.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: installment, credit, gateway, card, payment

payzee-payment-gateway/payzee.php 69% from 13 tests

"Payzee" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Requires at least: Required version must match the one declared in readme.txt ("4.7" instead of "5.2")
  • Description: A good plugin description is longer than 10 characters (currently 6 characters long)
  • Requires PHP: Required version must match the one declared in readme.txt ("7.0" instead of "7.2")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("payzee-payment-gateway.php" instead of "payzee.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected196 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13714196

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.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

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/icon.png3.30KB2.45KB▼ 25.95%