83% bonus-plus-wp

Code Review | WPBonusPlus

WordPress plugin WPBonusPlus scored83%from 54 tests.

About plugin

  • Plugin page: bonus-plus-wp
  • Plugin version: 2.5
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 7.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Jul 3, 2021
  • Latest release: Oct 5, 2023
  • Number of updates: 27
  • Update frequency: every 30.6 days
  • Top authors: redmonkey73 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /721 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
Install script ran successfully

Server metrics [RAM: ▲0.31MB] [CPU: ▼1.77ms] Passed 4 tests

A check of server-side resources used by WPBonusPlus
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.77 ▲0.3144.40 ▲3.63
Dashboard /wp-admin3.62 ▲0.3246.04 ▲0.26
Posts /wp-admin/edit.php3.74 ▲0.3847.45 ▼1.05
Add New Post /wp-admin/post-new.php6.20 ▲0.3196.75 ▼9.93
Media Library /wp-admin/upload.php3.55 ▲0.3138.70 ▲4.29
Настройки /wp-admin/admin.php?page=bonusplus3.5137.25

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

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

Browser metrics Passed 4 tests

A check of browser resources used by WPBonusPlus
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.01 ▼0.341.72 ▲0.1237.20 ▼0.97
Dashboard /wp-admin2,195 ▲145.50 ▼0.2180.20 ▼27.8738.49 ▼7.15
Posts /wp-admin/edit.php2,100 ▼31.95 ▼0.0837.35 ▼7.6731.73 ▼8.23
Add New Post /wp-admin/post-new.php1,537 ▲1118.41 ▼5.26651.30 ▼5.7558.42 ▼1.72
Media Library /wp-admin/upload.php1,394 ▼34.16 ▼0.0192.71 ▼5.2642.43 ▼0.31
Настройки /wp-admin/admin.php?page=bonusplus9432.1222.6938.76

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • bpwp_plugin_permalinks_flushed
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
The following issues need your attention
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/bonus-plus-wp/templates/client-account.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function BPWP\\add_action() in wp-content/plugins/bonus-plus-wp/inc/Logger.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 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
These attributes need to be fixed: Please take inspiration from this readme.txt

bonus-plus-wp/bonus-plus-wp.php 69% from 13 tests

The primary PHP file in "WPBonusPlus" version 2.5 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 192 characters long)
  • Requires at least: Required version must match the one declared in readme.txt ("4.0" instead of "7.0")
  • Domain Path: The domain path folder does not exist ("/languages")
  • 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

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected2,684 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP103384231,568
JavaScript5126207791
CSS210227
Markdown155098

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity22.12
▷ Minimum class complexity2.00
▷ Maximum class complexity48.00
Average method complexity3.80
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes112.50%
Methods63
▷ Static methods63100.00%
▷ Public methods63100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions440.00%
▷ Anonymous functions660.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.09MB with 0.06MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshots/scrrnshots-6.png45.73KB12.97KB▼ 71.64%
screenshots/screenshot-5.png44.47KB12.27KB▼ 72.41%