84% use-bunny-dns

Code Review | Use Bunny DNS

WordPress plugin Use Bunny DNS scored84%from 54 tests.

About plugin

  • Plugin page: use-bunny-dns
  • Plugin version: 1.1.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.3
  • WordPress version: 6.3.1
  • First release: Aug 9, 2022
  • Latest release: Aug 22, 2023
  • Number of updates: 9
  • Update frequency: every 42.0 days
  • Top authors: bouk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /415 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.05MB] [CPU: ▼3.58ms] Passed 4 tests

Server-side resources used by Use Bunny DNS
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0937.59 ▼6.13
Dashboard /wp-admin3.39 ▲0.0948.17 ▼2.70
Posts /wp-admin/edit.php3.44 ▲0.0946.55 ▼4.29
Add New Post /wp-admin/post-new.php5.91 ▲0.02104.21 ▲2.00
Media Library /wp-admin/upload.php3.25 ▲0.0235.38 ▼1.19

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 151 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Use Bunny DNS
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,828 ▲6714.25 ▼0.022.17 ▲0.5040.92 ▼2.54
Dashboard /wp-admin2,209 ▲385.63 ▼0.0295.08 ▲0.6848.19 ▲10.24
Posts /wp-admin/edit.php2,118 ▲182.02 ▲0.0142.02 ▲4.0841.69 ▲5.90
Add New Post /wp-admin/post-new.php1,535 ▲922.91 ▼0.28669.86 ▼7.8352.03 ▲0.79
Media Library /wp-admin/upload.php1,417 ▲204.19 ▼0.0394.88 ▼6.1344.91 ▼0.26

Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

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
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 98× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/use-bunny-dns/vendor/monolog/monolog/src/Monolog/Handler/TestHandler.php:73
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/use-bunny-dns/vendor/monolog/monolog/src/Monolog/Handler/ProcessHandler.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\Handler' not found in wp-content/plugins/use-bunny-dns/vendor/monolog/monolog/src/Monolog/Handler/FilterHandler.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\Handler' not found in wp-content/plugins/use-bunny-dns/vendor/monolog/monolog/src/Monolog/Handler/NullHandler.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/use-bunny-dns/vendor/monolog/monolog/src/Monolog/Handler/AmqpHandler.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Formatter\ormalizerFormatter' not found in wp-content/plugins/use-bunny-dns/vendor/monolog/monolog/src/Monolog/Formatter/LogstashFormatter.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/use-bunny-dns/vendor/monolog/monolog/src/Monolog/Handler/NewRelicHandler.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractHandler' not found in wp-content/plugins/use-bunny-dns/vendor/monolog/monolog/src/Monolog/Handler/SamplingHandler.php:33
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/use-bunny-dns/vendor/monolog/monolog/src/Monolog/Handler/ErrorLogHandler.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\SocketHandler' not found in wp-content/plugins/use-bunny-dns/vendor/monolog/monolog/src/Monolog/Handler/FlowdockHandler.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Donate link: Invalid url: ""
You can take inspiration from this readme.txt

use-bunny-dns/use-bunny-dns.php Passed 13 tests

The primary PHP file in "Use Bunny DNS" version 1.1.1 is used by WordPress to initiate all plugin functionality
40 characters long description:
Handles automatic purge of CDN pull zone

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
Success! There were no dangerous files found in this plugin9,329 lines of code in 147 files:
LanguageFilesBlank linesComment linesLines of code
PHP1402,2016,0108,410
Markdown42020648
JSON300271

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity9.16
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.54
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces16
Interfaces10
Traits5
Classes117
▷ Abstract classes86.84%
▷ Concrete classes10993.16%
▷ Final classes32.75%
Methods725
▷ Static methods557.59%
▷ Public methods49868.69%
▷ Protected methods16222.34%
▷ Private methods658.97%
Functions21
▷ Named functions14.76%
▷ Anonymous functions2095.24%
Constants66
▷ Global constants23.03%
▷ Class constants6496.97%
▷ Public constants3757.81%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin