78% bulletin

Code Review | Bulletin

WordPress plugin Bulletin scored78%from 54 tests.

About plugin

  • Plugin page: bulletin
  • Plugin version: 1.0.9
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.6.1
  • WordPress version: 6.3.1
  • First release: Mar 25, 2016
  • Latest release: Oct 31, 2016
  • Number of updates: 23
  • Update frequency: every 9.6 days
  • Top authors: martijngastkemper (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /910 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.15MB] [CPU: ▼2.62ms] Passed 4 tests

An overview of server-side resources used by Bulletin
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1440.69 ▼4.57
Dashboard /wp-admin3.51 ▲0.2049.27 ▼3.84
Posts /wp-admin/edit.php3.56 ▲0.2056.67 ▲4.79
Add New Post /wp-admin/post-new.php6.03 ▲0.1394.91 ▼6.87
Media Library /wp-admin/upload.php3.37 ▲0.1338.24 ▲8.02
Bulletin /wp-admin/options-general.php?page=bulletin3.3335.51

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Bulletin
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.27 ▲0.012.16 ▲0.4746.45 ▲0.97
Dashboard /wp-admin2,196 ▲225.69 ▲0.0689.36 ▼15.4439.46 ▼5.78
Posts /wp-admin/edit.php2,104 ▲41.99 ▲0.0039.74 ▲3.2036.48 ▲1.41
Add New Post /wp-admin/post-new.php1,529 ▲123.04 ▼0.05653.56 ▼1.3663.96 ▼7.89
Media Library /wp-admin/upload.php1,401 ▼24.17 ▲0.00100.32 ▼0.7243.34 ▼4.46
Bulletin /wp-admin/options-general.php?page=bulletin8022.0325.7927.11

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_widget_bulletin
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

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 output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/bulletin/public/partials/bulletin-public-display.php
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/bulletin/admin/partials/bulletin-admin-display.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/bulletin/public/partials/bulletin-widget.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

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:
  • Plugin Name: You should set the name of your plugin on the first line ( === bulletin === )
The official readme.txt is a good inspiration

bulletin/bulletin.php Passed 13 tests

"Bulletin" version 1.0.9's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
46 characters long description:
Let visitors subscribe to your Bulletin lists.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected934 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
PHP24275871791
PO File1232468
JSON30067
JavaScript24546
Markdown1002
CSS2080

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity6.27
▷ Minimum class complexity1.00
▷ Maximum class complexity39.00
Average method complexity2.23
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes00.00%
Methods65
▷ Static methods57.69%
▷ Public methods5787.69%
▷ Protected methods00.00%
▷ Private methods812.31%
Functions5
▷ Named functions480.00%
▷ Anonymous functions120.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
PNG images were not found in this plugin