72% dx2-band-theme-manager

Code Review | Band Managment Tools

WordPress plugin Band Managment Tools scored72%from 54 tests.

About plugin

  • Plugin page: dx2-band-theme-ma...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-4.6
  • WordPress version: 6.3.1
  • First release: Sep 5, 2016
  • Latest release: Aug 30, 2016
  • Number of updates: 2
  • Update frequency: every 1.5 days
  • Top authors: dx2systems (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /568 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.53MB] [CPU: ▼14.70ms] Passed 4 tests

Server-side resources used by Band Managment Tools
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1638.39 ▼5.14
Dashboard /wp-admin3.46 ▲0.1648.79 ▲0.01
Posts /wp-admin/edit.php3.56 ▲0.2048.85 ▲4.73
Add New Post /wp-admin/post-new.php3.29 ▼2.5936.10 ▼56.48
Media Library /wp-admin/upload.php3.37 ▲0.1435.33 ▲2.81
Gear /wp-admin/edit.php?post_type=gear3.4134.28
Songs /wp-admin/edit.php?post_type=song3.4136.41
Add New /wp-admin/post-new.php?post_type=song3.2933.28
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=album3.5135.23
Band Members /wp-admin/edit.php?post_type=bandmember3.4134.57
Add New /wp-admin/post-new.php?post_type=bandmember3.2934.42
Gigs /wp-admin/edit.php?post_type=gig3.4134.87
Add New /wp-admin/post-new.php?post_type=gear3.2933.95
Add New /wp-admin/post-new.php?post_type=album3.2935.76
Add New /wp-admin/post-new.php?post_type=gig3.2934.05

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 27 new files
Database: no new tables, 13 new options
New WordPress options
widget_band_gig_widget
bandmanager_showbandmembers
widget_theysaidso_widget
widget_recent-comments
bandmanager_showgear
bandmanager_showalbums
bandmanager_showgigs
db_upgraded
widget_band_album_widget
theysaidso_admin_options
...

Browser metrics Passed 4 tests

An overview of browser requirements for Band Managment Tools
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,053 ▲28213.41 ▼1.041.69 ▼0.4842.03 ▼1.56
Dashboard /wp-admin2,444 ▲2735.02 ▼0.78107.26 ▼16.2541.99 ▼4.29
Posts /wp-admin/edit.php2,246 ▲1542.52 ▲0.4840.10 ▲0.8135.37 ▼1.75
Add New Post /wp-admin/post-new.php1,645 ▲11117.92 ▼5.01709.45 ▲42.1354.77 ▲3.37
Media Library /wp-admin/upload.php1,546 ▲1644.26 ▼0.0198.23 ▼4.2943.28 ▲1.21
Gear /wp-admin/edit.php?post_type=gear1,2132.2533.6830.08
Songs /wp-admin/edit.php?post_type=song1,2722.2656.1628.73
Add New /wp-admin/post-new.php?post_type=song3,2559.20224.9482.65
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=album1,4712.0133.5429.13
Band Members /wp-admin/edit.php?post_type=bandmember1,2322.2634.0529.16
Add New /wp-admin/post-new.php?post_type=bandmember2,4238.02160.2358.60
Gigs /wp-admin/edit.php?post_type=gig1,2532.2434.2030.81
Add New /wp-admin/post-new.php?post_type=gear2,6227.93168.8760.30
Add New /wp-admin/post-new.php?post_type=album3,0158.08175.1964.05
Add New /wp-admin/post-new.php?post_type=gig2,6778.00171.3560.77

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 13 options
    • bandmanager_showalbums
    • widget_recent-posts
    • bandmanager_showgigs
    • widget_theysaidso_widget
    • widget_band_album_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_band_gig_widget
    • can_compress_scripts
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
  • 20 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=gig
    • > Notice in wp-content/plugins/dx2-band-theme-manager/posttypes/gig_cpt.php+47
    Trying to get property 'post_type' of non-object
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=album
    • > Warning in wp-content/plugins/dx2-band-theme-manager/posttypes/albums_cpt.php+186
    count(): Parameter must be an array or an object that implements Countable

SRP 0% from 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
Please fix the following
  • 18× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
    • > /wp-content/plugins/dx2-band-theme-manager/posttypes/bandmembers_cpt.php
    • > /wp-content/plugins/dx2-band-theme-manager/objects.php
    • > /wp-content/plugins/dx2-band-theme-manager/posttypes/gig_cpt.php
    • > /wp-content/plugins/dx2-band-theme-manager/widgets/giglisting.php
    • > /wp-content/plugins/dx2-band-theme-manager/bandmanager.php
    • > /wp-content/plugins/dx2-band-theme-manager/widgets/blogposts.php
    • > /wp-content/plugins/dx2-band-theme-manager/widgets.php
    • > /wp-content/plugins/dx2-band-theme-manager/helpers.php
    • > /wp-content/plugins/dx2-band-theme-manager/shortcodes.php
    • > /wp-content/plugins/dx2-band-theme-manager/posttypes.php
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'CoreObject' not found in wp-content/plugins/dx2-band-theme-manager/objects/gig.class.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/dx2-band-theme-manager/objects/class-tgm-plugin-activation.php:2101
    • > PHP Fatal error
      Uncaught Error: Class 'CoreObject' not found in wp-content/plugins/dx2-band-theme-manager/objects/bandmember.class.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'CoreObject' not found in wp-content/plugins/dx2-band-theme-manager/objects/song.class.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'CoreObject' not found in wp-content/plugins/dx2-band-theme-manager/objects/gear.class.php:2

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === dx2-band-theme-manager === )
You can look at the official readme.txt

dx2-band-theme-manager/bandmanager.php 92% from 13 tests

Analyzing the main PHP file in "Band Managment Tools" version 1.0
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("dx2-band-theme-manager.php" instead of "bandmanager.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected4,067 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP246731,7413,910
JavaScript163104
CSS18053

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.33
Average class complexity28.12
▷ Minimum class complexity1.00
▷ Maximum class complexity204.00
Average method complexity3.80
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes00.00%
Methods155
▷ Static methods63.87%
▷ Public methods13285.16%
▷ Protected methods2314.84%
▷ Private methods00.00%
Functions62
▷ Named functions62100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin