89% bannerbear

Code Review | Generate Dynamic Images - Bannerbear

WordPress plugin Generate Dynamic Images - Bannerbear scored89%from 54 tests.

About plugin

  • Plugin page: bannerbear
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.1
  • WordPress version: 6.3.1
  • First release: Nov 19, 2022
  • Latest release: Nov 19, 2022
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: yongfook (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

40+ active /618 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.34MB] [CPU: ▼6.06ms] Passed 4 tests

Server-side resources used by Generate Dynamic Images - Bannerbear
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.76 ▲0.3047.77 ▲5.13
Dashboard /wp-admin3.71 ▲0.3652.02 ▼7.52
Posts /wp-admin/edit.php3.76 ▲0.4050.07 ▼0.32
Add New Post /wp-admin/post-new.php6.23 ▲0.3588.02 ▼21.51
Media Library /wp-admin/upload.php3.57 ▲0.3444.50 ▲8.17

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 35 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_bannerbear
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Generate Dynamic Images - Bannerbear
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,842 ▲7114.26 ▼0.041.89 ▲0.1142.45 ▼3.75
Dashboard /wp-admin2,245 ▲655.59 ▼0.0689.79 ▼4.8041.89 ▲1.57
Posts /wp-admin/edit.php2,153 ▲502.01 ▼0.0236.37 ▼8.6932.22 ▼5.93
Add New Post /wp-admin/post-new.php6,208 ▲4,68218.77 ▼4.18942.20 ▲260.7859.60 ▼6.38
Media Library /wp-admin/upload.php1,456 ▲594.22 ▲0.08108.36 ▼1.5246.35 ▲2.47

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_bannerbear
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: image, og, dynamic image, open graph, widget

bannerbear/bannerbear.php 85% from 13 tests

The entry point to "Generate Dynamic Images - Bannerbear" version 1.0.0 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Requires at least: Required version does not match the one declared in readme.txt ("4.9" instead of "5.5")
  • Requires PHP: Required version does not match the one declared in readme.txt ("5.6" instead of "7.0")

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
Good job! No executable or dangerous file extensions detected1,584 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP234368161,582
JavaScript2002

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity23.22
▷ Minimum class complexity1.00
▷ Maximum class complexity55.00
Average method complexity3.38
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods85
▷ Static methods55.88%
▷ Public methods7992.94%
▷ Protected methods55.88%
▷ Private methods11.18%
Functions6
▷ Named functions583.33%
▷ Anonymous functions116.67%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/placeholder.png2.59KB2.34KB▼ 9.70%