88% buybot-notifications

Code Review | BUYbot Notifications

WordPress plugin BUYbot Notifications scored 88% from 54 tests.

About plugin

  • Plugin page: buybot-notifications
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.6 or higher+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8 or higher-5.8
  • WordPress version: 5.8.1
  • First release: Sep 24, 2021
  • Latest release: Jan 5, 2022
  • Number of updates: 12
  • Update frequency: every 8.6 days
  • Top authors: buynxt1 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 179 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼145.60ms] Passed 4 tests

A check of server-side resources used by BUYbot Notifications
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0030.86 ▲5.14
Dashboard /wp-admin3.08 ▲0.0135.05 ▼6.45
Posts /wp-admin/edit.php3.13 ▲0.0233.29 ▲0.54
Add New Post /wp-admin/post-new.php5.45 ▲0.0172.49 ▼575.62
Media Library /wp-admin/upload.php3.02 ▲0.0224.57 ▼0.85

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 15 new files
Database: no new tables, 1 new option
New WordPress options
buybot_notifications_option_name

Browser metrics Passed 4 tests

BUYbot Notifications: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,694 ▲9315.70 ▼0.336.93 ▲0.9875.95 ▲5.79
Dashboard /wp-admin2,958 ▲656.01 ▼0.17115.00 ▼13.67166.44 ▼1.60
Posts /wp-admin/edit.php2,734 ▼93.25 ▼0.1265.80 ▲3.69135.42 ▲0.69
Add New Post /wp-admin/post-new.php3,762 ▲2718.45 ▲0.49438.37 ▼27.55154.19 ▼1.29
Media Library /wp-admin/upload.php1,780 ▲315.52 ▼0.03134.61 ▼11.64179.42 ▼7.35

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options were found after uninstall: 1 option
    • buybot_notifications_option_name

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 79% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Requires at least: Invalid version format
  • Requires php: Invalid version format
You can take inspiration from this readme.txt

buybot-notifications/buybotnotifications.php 69% from 13 tests

The main file in "BUYbot Notifications" v. 1.0.2 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 ("buybot-notifications.php" instead of "buybotnotifications.php")
  • Requires at least: Please use periods and digits for the required version (ex. "7.0" instead of "5.8 or higher")
  • Requires PHP: Please use periods and digits for the required version (ex. "7.0" instead of "5.6 or higher")
  • Text Domain: Please use dashes and lowercase characters for text domains

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
Good job! No executable or dangerous file extensions detected498 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP311222404
CSS226093
JavaScript218941

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity17.50
▷ Minimum class complexity4.00
▷ Maximum class complexity31.00
Average method complexity3.36
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods14
▷ Static methods17.14%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected