72% bang-syslog

Code Review | Bang System Logging

WordPress plugin Bang System Logging scored72%from 54 tests.

About plugin

  • Plugin page: bang-syslog
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.5
  • WordPress version: 6.3.1
  • First release: Aug 30, 2013
  • Latest release: Aug 30, 2013
  • Number of updates: 4
  • Update frequency: every 19.8 days
  • Top authors: marcus.downing (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,088 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.18MB] [CPU: ▲0.93ms] Passed 4 tests

Server-side resources used by Bang System Logging
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.2046.88 ▲1.30
Dashboard /wp-admin3.48 ▲0.1850.43 ▼0.89
Posts /wp-admin/edit.php3.60 ▲0.2453.33 ▲1.12
Add New Post /wp-admin/post-new.php6.06 ▲0.1897.89 ▲2.20
Media Library /wp-admin/upload.php3.41 ▲0.1846.47 ▲11.77

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Bang System Logging
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲5113.28 ▼1.111.83 ▼0.1339.71 ▼5.09
Dashboard /wp-admin2,211 ▲234.86 ▼0.96109.54 ▼11.6043.21 ▼4.44
Posts /wp-admin/edit.php2,097 ▲82.05 ▼0.0941.03 ▲3.5835.35 ▼3.56
Add New Post /wp-admin/post-new.php1,537 ▼523.41 ▲0.48649.94 ▼38.4247.98 ▼11.36
Media Library /wp-admin/upload.php1,399 ▲144.25 ▲0.02100.56 ▼14.5144.42 ▼4.27
System Logging /wp-admin/bang-syslog-settings.php260.440.1014.07

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/bang-syslog/show-log.php
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bang-syslog/bang-syslog-settings.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function bang_syslog_tail_add_message() in wp-content/plugins/bang-syslog/bang-syslog-logging.php:162
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/bang-syslog/bang-syslog-time.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_transient() in wp-content/plugins/bang-syslog/bang-syslog-tail.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function bang_syslog_tail_add_message() in wp-content/plugins/bang-syslog/bang-syslog-logging.php:162

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following browser errors
    • > GET request to /wp-admin/bang-syslog-settings.php
    • > Network (severe)
    wp-admin/bang-syslog-settings.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Contributors: Contributors not specified
  • Screenshots: These screenshots do not have images: #1 (The settings page), #2 (A coloured log file)
The official readme.txt is a good inspiration

bang-syslog/main.php 92% from 13 tests

"Bang System Logging" version 1.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("bang-syslog.php" instead of "main.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin1,027 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP820179924
CSS40063
JavaScript20021
Bourne Shell13019

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions40
▷ Named functions40100.00%
▷ Anonymous functions00.00%
Constants20
▷ Global constants20100.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
6 PNG files occupy 0.40MB with 0.24MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/bang.png3.76KB1.22KB▼ 67.67%
images/bang-black-v.png3.58KB0.72KB▼ 79.87%
images/bang-black.png3.57KB0.70KB▼ 80.44%
images/bang-widget.png0.81KB1.11KB0.00%
screenshot-1.png103.11KB35.97KB▼ 65.12%