72% knockoutbunny

Code Review | KnockoutBunny

WordPress plugin KnockoutBunny scored72%from 54 tests.

About plugin

  • Plugin page: knockoutbunny
  • Plugin version: 1.2.0
  • PHP compatiblity: 7.3.9+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-5.8
  • WordPress version: 6.3.1
  • First release: Mar 26, 2021
  • Latest release: Oct 14, 2021
  • Number of updates: 8
  • Update frequency: every 28.2 days
  • Top authors: knockoutbunny (100%)

Code review

54 tests

User reviews

1 review

Install metrics

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

Server metrics [RAM: ▲0.09MB] [CPU: ▼5.03ms] Passed 4 tests

Server-side resources used by KnockoutBunny
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0450.16 ▲2.53
Dashboard /wp-admin3.40 ▲0.0947.53 ▼5.72
Posts /wp-admin/edit.php3.51 ▲0.1546.93 ▼4.95
Add New Post /wp-admin/post-new.php6.04 ▲0.1587.33 ▼7.56
Media Library /wp-admin/upload.php3.32 ▲0.0936.91 ▼1.88
knockoutbunny_results /wp-admin/edit.php?post_type=knockoutbunny_result3.3637.48
KnockoutBunny /wp-admin/options-general.php?page=ngg_kobunny3.2632.36
Add New /wp-admin/post-new.php?post_type=knockoutbunny_result3.3544.29

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for KnockoutBunny
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,883 ▲9714.27 ▼0.362.15 ▲0.1746.76 ▲2.44
Dashboard /wp-admin2,264 ▲875.63 ▼0.0396.35 ▼5.3042.67 ▼2.72
Posts /wp-admin/edit.php2,131 ▲312.00 ▲0.0034.33 ▼4.8035.18 ▲0.02
Add New Post /wp-admin/post-new.php1,554 ▲2823.05 ▼0.00694.45 ▲15.8457.88 ▲3.28
Media Library /wp-admin/upload.php1,425 ▲254.22 ▲0.0597.24 ▼8.0441.84 ▼1.12
knockoutbunny_results /wp-admin/edit.php?post_type=knockoutbunny_result1,1031.9231.6828.48
KnockoutBunny /wp-admin/options-general.php?page=ngg_kobunny9192.0022.0629.89
Add New /wp-admin/post-new.php?post_type=knockoutbunny_result1,5882.5452.1361.00

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

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=ngg_kobunny
    • > Notice in wp-content/plugins/knockoutbunny/includes/ngg_kobunny_admin.php+274
    Trying to access array offset on value of type bool

SRP 0% 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
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/knockoutbunny/includes/ngg_kobunny_notready.php
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/knockoutbunny/knockoutbunny.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/knockoutbunny/includes/ngg_kobunny_admin.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_js() in wp-content/plugins/knockoutbunny/includes/ngg_kobunny_playiframe.php:10

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

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: competition, quiz, engagement, survey, game

knockoutbunny/knockoutbunny.php 92% from 13 tests

This is the main PHP file of "KnockoutBunny" version 1.2.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:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
Success! There were no dangerous files found in this plugin701 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP59774381
JavaScript1713256
CSS18264

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions25
▷ Named functions2496.00%
▷ Anonymous functions14.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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.04MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/ngg_kobunny_guide.png41.67KB12.54KB▼ 69.90%