83% bunnycdnbunnyapi

Code Review | Bunny.net+BunnyAPI

WordPress plugin Bunny.net+BunnyAPI scored83%from 54 tests.

About plugin

  • Plugin page: bunnycdnbunnyapi
  • Plugin version: 2.0.7
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Mar 3, 2020
  • Latest release: Sep 14, 2023
  • Number of updates: 26
  • Update frequency: every 49.6 days
  • Top authors: notetoservices (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

20+ active /4,584 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.17MB] [CPU: ▼5.30ms] Passed 4 tests

This is a short check of server-side resources used by Bunny.net+BunnyAPI
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1843.85 ▼0.07
Dashboard /wp-admin3.47 ▲0.1751.86 ▼4.71
Posts /wp-admin/edit.php3.59 ▲0.2350.45 ▼2.09
Add New Post /wp-admin/post-new.php6.05 ▲0.1795.58 ▼13.52
Media Library /wp-admin/upload.php3.40 ▲0.1738.44 ▼0.86
BunnyAPI /wp-admin/tools.php?page=bunnycdn_extended3.3633.22
Bunny.net Media /wp-admin/upload.php?page=bunnycdn-media-library3.3433.54

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Bunny.net+BunnyAPI
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲7113.24 ▼1.201.78 ▼0.2742.99 ▼1.03
Dashboard /wp-admin2,219 ▲284.83 ▼0.06103.13 ▲1.3242.14 ▼0.27
Posts /wp-admin/edit.php2,102 ▲102.00 ▼0.0535.50 ▼5.6432.87 ▼5.07
Add New Post /wp-admin/post-new.php1,548 ▲1518.11 ▼5.08622.68 ▼47.2357.63 ▼1.74
Media Library /wp-admin/upload.php1,397 ▲94.25 ▲0.01100.07 ▼13.3743.21 ▼3.56
BunnyAPI /wp-admin/tools.php?page=bunnycdn_extended8382.1424.4832.56
Bunny.net Media /wp-admin/upload.php?page=bunnycdn-media-library6721.147.1323.78

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, 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
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bunnycdnbunnyapi/inc/bunnyapiMedia.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: Screenshot #5 (BunnyAPI Entry Key) image required
  • Screenshots: Please a description for screenshot #13 in bunnycdnbunnyapi/assets to your readme.txt
  • Requires at least: The plugin version is formatted incorrectly
The official readme.txt might help

bunnycdnbunnyapi/bunnyapi.php 85% from 13 tests

"Bunny.net+BunnyAPI" version 2.0.7's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("bunnycdnbunnyapi.php" instead of "bunnyapi.php")
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin808 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP4271464807
CSS1001

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity31.25
▷ Minimum class complexity7.00
▷ Maximum class complexity55.00
Average method complexity4.27
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods37
▷ Static methods3081.08%
▷ Public methods37100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions480.00%
▷ Anonymous functions120.00%
Constants11
▷ Global constants11100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
13 compressed PNG files occupy 0.21MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-13.png63.97KB64.12KB0.00%
assets/screenshot-12.png9.15KB9.41KB0.00%
assets/screenshot-6.png11.39KB11.44KB0.00%
assets/screenshot-7.png29.93KB30.00KB0.00%
assets/screenshot-10.png8.27KB8.29KB0.00%