73% bulletin-announcements

Code Review | Announcement & Notification Banner - Bulletin

WordPress plugin Announcement & Notification Banner - Bulletin scored73%from 54 tests.

About plugin

  • Plugin page: bulletin-announce...
  • Plugin version: 3.8.5
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3.2
  • WordPress version: 6.3.1
  • First release: Jun 5, 2020
  • Latest release: Oct 14, 2023
  • Number of updates: 45
  • Update frequency: every 27.3 days
  • Top authors: mikewire_rocksolid (100%)

Code review

54 tests

User reviews

16 reviews

Install metrics

1,000+ active /35,986 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲5.06MB] [CPU: ▲27.37ms] 75% from 4 tests

A check of server-side resources used by Announcement & Notification Banner - Bulletin
It is recommended to improve the following
  • Extra RAM: Extra memory usage must be kept under 5MB (currently 5.06MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /8.89 ▲5.4369.06 ▲33.47
Dashboard /wp-admin8.91 ▲5.6072.61 ▲26.55
Posts /wp-admin/edit.php8.91 ▲5.5584.99 ▲35.96
Add New Post /wp-admin/post-new.php9.56 ▲3.67114.43 ▲18.61
Media Library /wp-admin/upload.php8.91 ▲5.6865.42 ▲30.85
Freemius Debug [v.2.5.11] /wp-admin/admin.php?page=freemius8.9156.54

Server storage [IO: ▲5.01MB] [DB: ▲0.01MB] Passed 3 tests

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 428 new files
Database: 2 new tables, 9 new options
New tables
wp_bulletinwp_bulletins
wp_bulletinwp_options
New WordPress options
fs_debug_mode
can_compress_scripts
fs_active_plugins
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
fs_accounts

Browser metrics Passed 4 tests

A check of browser resources used by Announcement & Notification Banner - Bulletin
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,842 ▲8114.27 ▼0.071.53 ▼0.0928.04 ▼8.93
Dashboard /wp-admin2,242 ▲655.59 ▲0.0695.22 ▲6.8779.76 ▲40.70
Posts /wp-admin/edit.php2,160 ▲572.02 ▲0.0240.18 ▼1.4536.96 ▼0.28
Add New Post /wp-admin/post-new.php1,561 ▲2423.14 ▲4.99677.08 ▲22.5551.41 ▼15.35
Media Library /wp-admin/upload.php1,447 ▲474.23 ▲0.0894.89 ▼1.1778.09 ▲34.88
Freemius Debug [v.2.5.11] /wp-admin/admin.php?page=freemius1,1111.6727.2529.06

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/bulletin-announcements/modules/freemius/includes/class-freemius.php+8515
    Undefined property: stdClass::$plugins
  • This plugin does not fully uninstall, leaving 9 options in the database
    • fs_accounts
    • db_upgraded
    • can_compress_scripts
    • fs_debug_mode
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • fs_active_plugins

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
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/bulletin-announcements/core/config.php:6

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 93% 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: banners, announcements, notice, countdown, notifications

bulletin-announcements/bulletinwp.php 85% from 13 tests

The principal PHP file in "Announcement & Notification Banner - Bulletin" v. 3.8.5 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("bulletin-announcements.php" instead of "bulletinwp.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin55,046 lines of code in 327 files:
LanguageFilesBlank linesComment linesLines of code
PHP1438,55018,31437,942
JavaScript962,85594711,473
CSS194512302,174
PO File58851,0502,014
Sass23284251,088
SVG4005339
XML13016

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
It is recommended to fix the following
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 3,087)
Cyclomatic complexity
Average complexity per logical line of code0.61
Average class complexity77.48
▷ Minimum class complexity1.00
▷ Maximum class complexity3,087.00
Average method complexity4.46
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes61
▷ Abstract classes23.28%
▷ Concrete classes5996.72%
▷ Final classes11.69%
Methods1,374
▷ Static methods19914.48%
▷ Public methods97671.03%
▷ Protected methods181.31%
▷ Private methods38027.66%
Functions101
▷ Named functions9998.02%
▷ Anonymous functions21.98%
Constants152
▷ Global constants10569.08%
▷ Class constants4730.92%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
modules/freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
modules/freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
modules/freemius/assets/img/bulletinwp.png13.57KB3.86KB▼ 71.55%