84% traveler-payhere

Code Review | Traveler Payhere

WordPress plugin Traveler Payhere scored84%from 54 tests.

About plugin

  • Plugin page: traveler-payhere
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.7
  • WordPress version: 6.3.1
  • First release: Apr 15, 2021
  • Latest release: Apr 15, 2021
  • Number of updates: 6
  • Update frequency: N/A
  • Top authors: dynolabs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /352 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

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

This is a short check of server-side resources used by Traveler Payhere
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.21 ▼5.00
Dashboard /wp-admin3.31 ▲0.0145.62 ▼4.33
Posts /wp-admin/edit.php3.36 ▲0.0144.92 ▼2.41
Add New Post /wp-admin/post-new.php5.89 ▲0.0191.41 ▲3.04
Media Library /wp-admin/upload.php3.23 ▲0.0036.21 ▲1.41

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Traveler Payhere
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.22 ▼1.061.70 ▼0.3144.87 ▼3.24
Dashboard /wp-admin2,206 ▲155.91 ▲1.07107.53 ▼10.2242.29 ▼4.08
Posts /wp-admin/edit.php2,092 ▲62.03 ▲0.0138.95 ▲0.9035.80 ▲1.99
Add New Post /wp-admin/post-new.php1,547 ▲3318.10 ▲0.41600.96 ▼82.9276.50 ▲22.98
Media Library /wp-admin/upload.php1,391 ▲34.26 ▲0.0594.06 ▼10.2342.40 ▼2.25

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • 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)
Even though no errors were found, this is by no means an exhaustive test

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
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'STAbstactPaymentGateway' not found in wp-content/plugins/traveler-payhere/inc/payhere.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function trailingslashit() in wp-content/plugins/traveler-payhere/traveler-payhere.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/traveler-payhere/views/payhere.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: lkr, sri lanka, payhere, payment, traveler...

traveler-payhere/traveler-payhere.php Passed 13 tests

The main PHP script in "Traveler Payhere" version 1.0.0 is automatically included on every request by WordPress
38 characters long description:
This plugin is used for Traveler Theme

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
Everything looks great! No dangerous files found in this plugin346 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP41419334
Markdown17012

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity14.50
▷ Minimum class complexity7.00
▷ Maximum class complexity22.00
Average method complexity1.96
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods28
▷ Static methods310.71%
▷ Public methods2692.86%
▷ Protected methods00.00%
▷ Private methods27.14%
Functions0
▷ Named functions00.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 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/us.png9.55KB3.79KB▼ 60.31%