83% woo-payment-addon

Code Review | WePay Woocommerce addon

WordPress plugin WePay Woocommerce addon scored83%from 54 tests.

About plugin

  • Plugin page: woo-payment-addon
  • Plugin version: 3.0.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Mar 31, 2016
  • Latest release: Jan 5, 2021
  • Number of updates: 8
  • Update frequency: every 217.6 days
  • Top authors: pawaryogesh1989 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /3,364 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼8.03ms] Passed 4 tests

Analyzing server-side resources used by WePay Woocommerce addon
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1042.38 ▲1.62
Dashboard /wp-admin3.41 ▲0.1051.85 ▼0.70
Posts /wp-admin/edit.php3.52 ▲0.1653.06 ▼2.39
Add New Post /wp-admin/post-new.php5.99 ▲0.1087.25 ▼25.62
Media Library /wp-admin/upload.php3.33 ▲0.1038.39 ▼3.39

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

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

Browser metrics Passed 4 tests

A check of browser resources used by WePay Woocommerce addon
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.30 ▼0.081.88 ▲0.0145.89 ▼2.50
Dashboard /wp-admin2,198 ▲215.63 ▲0.0692.07 ▼2.0239.08 ▼3.77
Posts /wp-admin/edit.php2,103 ▲32.01 ▼0.0541.30 ▲0.5934.80 ▼0.64
Add New Post /wp-admin/post-new.php1,526 ▼2017.72 ▼5.46633.95 ▲16.0855.07 ▲1.82
Media Library /wp-admin/upload.php1,394 ▲34.23 ▲0.0397.78 ▲1.4545.36 ▲2.44

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-payment-addon/woocommerce-wepay-addon.php:478

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Requires at least: Invalid version format
You can look at the official readme.txt

woo-payment-addon/woocommerce-wepay-addon.php 92% from 13 tests

This is the main PHP file of "WePay Woocommerce addon" version 3.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("woo-payment-addon.php" instead of "woocommerce-wepay-addon.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
No dangerous file extensions were detected567 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2119188567

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity10.00
▷ Minimum class complexity1.00
▷ Maximum class complexity28.00
Average method complexity3.84
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods19
▷ Static methods947.37%
▷ Public methods1789.47%
▷ Protected methods00.00%
▷ Private methods210.53%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants112.50%
▷ Class constants787.50%
▷ Public constants7100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/payment-icons/salt.png16.08KB6.55KB▼ 59.27%