84% compare-payment

Code Review | Compare Payment

WordPress plugin Compare Payment scored84%from 54 tests.

About plugin

  • Plugin page: compare-payment
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.9.8
  • WordPress version: 6.3.1
  • First release: Nov 15, 2018
  • Latest release: Nov 15, 2018
  • Number of updates: 8
  • Update frequency: every 1.3 days
  • Top authors: AbileWeb (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /717 total downloads

Benchmarks

Plugin footprint 83% 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.03MB] [CPU: ▼2.19ms] Passed 4 tests

An overview of server-side resources used by Compare Payment
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0235.67 ▼5.14
Dashboard /wp-admin3.34 ▲0.0346.62 ▼5.67
Posts /wp-admin/edit.php3.39 ▲0.0348.96 ▲5.97
Add New Post /wp-admin/post-new.php5.94 ▲0.0594.95 ▼1.29
Media Library /wp-admin/upload.php3.26 ▲0.0334.33 ▲3.33
Payments /wp-admin/edit.php?post_type=compare-payments3.3033.58
Add New /wp-admin/post-new.php?post_type=compare-payments3.3242.24

Server storage [IO: ▲0.27MB] [DB: ▲0.07MB] Passed 3 tests

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

Browser metrics Passed 4 tests

An overview of browser requirements for Compare Payment
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,965 ▲23013.64 ▼0.748.51 ▲6.7142.41 ▼2.43
Dashboard /wp-admin2,255 ▲645.85 ▲0.98107.96 ▲1.9878.57 ▲31.26
Posts /wp-admin/edit.php2,135 ▲462.02 ▲0.0138.83 ▼2.8637.38 ▲1.27
Add New Post /wp-admin/post-new.php1,557 ▲1917.76 ▼5.70623.74 ▲13.6051.75 ▲5.43
Media Library /wp-admin/upload.php1,437 ▲494.14 ▼0.09107.06 ▲6.8947.83 ▲4.86
Payments /wp-admin/edit.php?post_type=compare-payments1,0961.9632.6431.79
Add New /wp-admin/post-new.php?post_type=compare-payments1,7613.5560.3174.59

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

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 fix the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/compare-payment/public/partials/compare-payment-public-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
1 plugin tags: payment

compare-payment/compare-payment.php Passed 13 tests

The main PHP file in "Compare Payment" ver. 1.0.2 adds more information about the plugin and also serves as the entry point for this plugin
50 characters long description:
This is online transaction payment compare plugin.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected9,077 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
CSS41,045158,240
PHP12169509459
JavaScript387148378

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity6.57
▷ Minimum class complexity1.00
▷ Maximum class complexity20.00
Average method complexity2.26
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods31
▷ Static methods26.45%
▷ Public methods2683.87%
▷ Protected methods00.00%
▷ Private methods516.13%
Functions3
▷ Named functions3100.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
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/images/ranger-mark.png0.20KB0.19KB▼ 6.83%
admin/images/transaction.png0.55KB0.78KB0.00%