90% api2cart-webhook-helper

Code Review | Webhook Helper

WordPress plugin Webhook Helper scored90%from 54 tests.

About plugin

  • Plugin page: api2cart-webhook-...
  • Plugin version: 1.6.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-6.2
  • WordPress version: 6.3.1
  • First release: Dec 28, 2018
  • Latest release: Sep 8, 2023
  • Number of updates: 25
  • Update frequency: every 68.6 days
  • Top authors: api2cartdev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,833 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.22MB] [CPU: ▼1.21ms] Passed 4 tests

This is a short check of server-side resources used by Webhook Helper
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.2237.59 ▼2.07
Dashboard /wp-admin3.51 ▲0.2145.62 ▼3.89
Posts /wp-admin/edit.php3.63 ▲0.2749.90 ▲1.30
Add New Post /wp-admin/post-new.php6.11 ▲0.2397.98 ▼0.17
Media Library /wp-admin/upload.php3.44 ▲0.2135.54 ▲3.10

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Webhook Helper
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲7713.67 ▼0.631.86 ▲0.1144.07 ▲0.38
Dashboard /wp-admin2,215 ▲335.90 ▲0.89107.44 ▼1.1041.92 ▼5.25
Posts /wp-admin/edit.php2,100 ▲142.02 ▲0.0041.14 ▲3.7837.54 ▲4.87
Add New Post /wp-admin/post-new.php1,521 ▼1217.66 ▼5.46687.53 ▲102.6254.50 ▼0.81
Media Library /wp-admin/upload.php1,400 ▲94.30 ▲0.1296.73 ▼0.6141.03 ▼2.15

Uninstaller [IO: ▲0.00MB] [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
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

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)
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: woocommerce integration, woocommerce plugin, woocommerce shopping cart updates, woocommerce webhooks

api2cart-webhook-helper/a2c-webhook-helper.php 92% from 13 tests

The main file in "Webhook Helper" v. 1.6.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("api2cart-webhook-helper.php" instead of "a2c-webhook-helper.php")

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
There were no executable files found in this plugin875 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP3186261875

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity65.00
▷ Minimum class complexity64.00
▷ Maximum class complexity66.00
Average method complexity3.78
▷ Minimum method complexity1.00
▷ Maximum method complexity37.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods46
▷ Static methods48.70%
▷ Public methods3269.57%
▷ Protected methods36.52%
▷ Private methods1123.91%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants111.11%
▷ Class constants888.89%
▷ Public constants8100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.09MB with 0.06MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png96.70KB39.28KB▼ 59.38%