78% better-bandsintown

Code Review | Better Bandsintown

WordPress plugin Better Bandsintown scored78%from 54 tests.

About plugin

  • Plugin page: better-bandsintown
  • Plugin version: 0.4.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-4.1.1
  • WordPress version: 6.3.1
  • First release: Feb 20, 2015
  • Latest release: Feb 22, 2015
  • Number of updates: 23
  • Update frequency: every 0.1 days
  • Top authors: mrpaplu (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /5,068 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼0.44ms] Passed 4 tests

An overview of server-side resources used by Better Bandsintown
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0440.26 ▲1.22
Dashboard /wp-admin3.34 ▲0.0349.19 ▲1.49
Posts /wp-admin/edit.php3.39 ▲0.0349.50 ▲0.89
Add New Post /wp-admin/post-new.php5.92 ▲0.0393.89 ▼5.36
Media Library /wp-admin/upload.php3.26 ▲0.0335.80 ▲1.53

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 16 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_bbit-widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Better Bandsintown
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,841 ▲10614.48 ▼0.301.97 ▲0.4337.60 ▼11.10
Dashboard /wp-admin2,209 ▲244.81 ▼1.0598.74 ▼4.8238.89 ▼3.99
Posts /wp-admin/edit.php2,089 ▼02.03 ▲0.0339.66 ▲1.0834.96 ▼3.37
Add New Post /wp-admin/post-new.php1,535 ▼723.09 ▲4.96636.61 ▲36.8953.61 ▲1.32
Media Library /wp-admin/upload.php1,388 ▼04.27 ▲0.0594.67 ▼11.4942.10 ▼2.73

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_bbit-widget
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% 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 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× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/better-bandsintown/bbit-shortcode-view.php
  • 14× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/better-bandsintown/bbit-widget.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/better-bandsintown/bbit-widget.php:3
    • > PHP Notice
      Undefined variable: bandname in wp-content/plugins/better-bandsintown/bbit-widget-view.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/better-bandsintown/bbit-widget-view.php:4
    • > PHP Notice
      Undefined variable: a in wp-content/plugins/better-bandsintown/bbit-shortcode-view.php on line 2
    • > PHP Notice
      Undefined variable: a in wp-content/plugins/better-bandsintown/bbit-shortcode-view.php on line 5
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/better-bandsintown/bbit-shortcode-view.php on line 5
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/better-bandsintown/bbit-widget-form.php:2
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/better-bandsintown/bbit-shortcode-view.php on line 4
    • > PHP Notice
      Undefined variable: a in wp-content/plugins/better-bandsintown/bbit-shortcode-view.php on line 4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
7 plugin tags: in, bandsintown, town, bands, tour...

better-bandsintown/index.php 85% from 13 tests

The main PHP file in "Better Bandsintown" ver. 0.4.2 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("better-bandsintown.php" instead of "index.php")

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
Success! There were no dangerous files found in this plugin403 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
CSS76021268
PHP62643135

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity2.33
▷ Minimum class complexity1.00
▷ Maximum class complexity4.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods8
▷ Static methods112.50%
▷ Public methods787.50%
▷ Protected methods00.00%
▷ Private methods112.50%
Functions6
▷ Named functions00.00%
▷ Anonymous functions6100.00%
Constants0
▷ Global constants00.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
2 PNG files occupy 0.10MB with 0.05MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/bandsintown.png54.33KB16.82KB▼ 69.04%
images/bandsintown-logo.png49.31KB33.36KB▼ 32.35%