90% thepeer-checkout

Code Review | Thepeer Payment Gateway for WooCommerce

WordPress plugin Thepeer Payment Gateway for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: thepeer-checkout
  • Plugin version: 1.0.6
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8.0-5.9
  • WordPress version: 6.3.1
  • First release: Mar 22, 2022
  • Latest release: Aug 25, 2023
  • Number of updates: 12
  • Update frequency: every 43.5 days
  • Top authors: thepeer (75%)tubiz (33.33%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /360 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: ▼10.76ms] Passed 4 tests

A check of server-side resources used by Thepeer Payment Gateway for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.34 ▼6.14
Dashboard /wp-admin3.31 ▲0.0150.33 ▼7.47
Posts /wp-admin/edit.php3.37 ▲0.0151.65 ▼1.07
Add New Post /wp-admin/post-new.php5.90 ▲0.0184.72 ▼25.85
Media Library /wp-admin/upload.php3.24 ▲0.0137.77 ▼3.57

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Thepeer Payment Gateway for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.38 ▲0.021.69 ▼0.4745.01 ▼2.19
Dashboard /wp-admin2,198 ▲245.62 ▼0.0589.88 ▼23.4338.53 ▼16.72
Posts /wp-admin/edit.php2,100 ▲32.03 ▲0.0235.44 ▼1.0635.76 ▼0.67
Add New Post /wp-admin/post-new.php1,526 ▼223.52 ▲0.28692.50 ▲14.5963.00 ▲10.82
Media Library /wp-admin/upload.php1,403 ▲34.21 ▲0.0296.12 ▼25.2940.21 ▼7.75

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

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)
No browser issues were found

Optimizations

Plugin configuration 96% from 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
8 plugin tags: woocommerce, payments, thepeer, nigeria, payment gateways...

thepeer-checkout/thepeer-checkout.php 92% from 13 tests

The main PHP script in "Thepeer Payment Gateway for WooCommerce" version 1.0.6 is automatically included on every request by WordPress
The following require your attention:
  • Requires at least: Required version must match the one declared in readme.txt ("4.7" instead of "3.8.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected502 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP2183142399
JavaScript4280103

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity57.00
▷ Minimum class complexity57.00
▷ Maximum class complexity57.00
Average method complexity5.00
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods1392.86%
▷ Protected methods00.00%
▷ Private methods17.14%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
1 compressed PNG file occupies 0.01MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/thepeer_wallets.png14.08KB14.59KB0.00%