89% conpay-checkout

Code Review | Conpay Checkout

WordPress plugin Conpay Checkout scored 89% from 54 tests.

About plugin

  • Plugin page: conpay-checkout
  • Plugin version: 1.4.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-5.7
  • WordPress version: 6.3.1
  • First release: May 19, 2020
  • Latest release: Mar 5, 2021
  • Number of updates: 11
  • Update frequency: every 26.4 days
  • Top authors: conpay (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 450 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
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by Conpay Checkout
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0242.10 ▼7.58
Dashboard /wp-admin3.33 ▲0.0254.17 ▲1.63
Posts /wp-admin/edit.php3.38 ▲0.0254.93 ▼1.29
Add New Post /wp-admin/post-new.php5.91 ▲0.0293.15 ▲1.72
Media Library /wp-admin/upload.php3.25 ▲0.0240.47 ▲3.57

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Conpay Checkout
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,837 ▲4813.33 ▲0.171.88 ▼3.1142.29 ▼3.12
Dashboard /wp-admin2,218 ▲154.83 ▲0.01107.08 ▼10.8941.05 ▲0.20
Posts /wp-admin/edit.php2,101 ▲122.02 ▼0.0041.99 ▲0.9838.15 ▲1.76
Add New Post /wp-admin/post-new.php1,532 ▼1023.28 ▲5.16772.83 ▲161.5255.68 ▲6.37
Media Library /wp-admin/upload.php1,403 ▲154.25 ▲0.0596.63 ▼21.3543.49 ▼3.65

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

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

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

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 90% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
4 plugin tags: payment, checkout, woocommerce, conpay

conpay-checkout/woocommerce-conpay.php 77% from 13 tests

"Conpay Checkout" version 1.4.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("conpay-checkout.php" instead of "woocommerce-conpay.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Requires at least: Required version must match the one declared in readme.txt ("4.0" instead of "3.0.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin987 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP13255205826
JavaScript24312104
CSS111057

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity45.00
▷ Minimum class complexity11.00
▷ Maximum class complexity79.00
Average method complexity3.38
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods37
▷ Static methods924.32%
▷ Public methods2772.97%
▷ Protected methods616.22%
▷ Private methods410.81%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants233.33%
▷ Class constants466.67%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/brazilian-flag.png4.32KB0.97KB▼ 77.62%
assets/images/logo-md-light.png7.31KB3.24KB▼ 55.63%
assets/images/conpay.png1.50KB1.44KB▼ 3.72%