10% mobile-dj-manager

Code Review | MDJM Event Management

WordPress plugin MDJM Event Management scored10%from 54 tests.

About plugin

  • Plugin page: mobile-dj-manager
  • Plugin version: 1.7.2
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Oct 5, 2014
  • Latest release: Nov 27, 2023
  • Number of updates: 457
  • Update frequency: every 7.3 days
  • Top authors: mikeyhoward1977 (90.81%)mdjm (6.35%)deckbooks (1.31%)bcdandd (1.31%)jackjpdiscos (1.09%)

Code review

54 tests

User reviews

7 reviews

Install metrics

100+ active /17,135 total downloads

Benchmarks

Plugin footprint 39% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/mobile-dj-manager/includes/install.php+683
    Undefined index: type

Server metrics [RAM: ▲7.99MB] [CPU: ▲64.02ms] 25% from 4 tests

Analyzing server-side resources used by MDJM Event Management
The following require your attention
  • RAM: Try to keep total memory usage under 10MB (currently 11.97MB on /wp-admin/post-new.php?post_type=mdjm-event)
  • CPU: Try to keep total CPU usage under 500.00ms (currently 2,975.64ms on /wp-admin/edit.php?post_type=mdjm-event&page=mdjm-addons)
  • Extra RAM: Extra memory usage should kept under 5MB (currently 7.99MB on /wp-admin/post-new.php?post_type=mdjm-event)
PageMemory (MB)CPU Time (ms)
Home /9.54 ▲6.0886.85 ▲49.83
Dashboard /wp-admin11.97 ▲8.67200.03 ▲151.35
Posts /wp-admin/edit.php12.06 ▲8.70127.49 ▲76.83
Add New Post /wp-admin/post-new.php14.52 ▲8.63150.92 ▲57.13
Media Library /wp-admin/upload.php11.81 ▲8.58106.22 ▲72.28
Enquiry Sources /wp-admin/edit-tags.php?taxonomy=enquiry-source&post_type=mdjm-event11.82105.51
MDJM Upgrades /wp-admin/admin.php?page=mdjm-upgrades11.7895.15
All Events /wp-admin/edit.php?post_type=mdjm-event11.97101.74
All Transactions /wp-admin/edit.php?post_type=mdjm-transaction11.94102.95
Automated Tasks /wp-admin/edit.php?post_type=mdjm-event&page=mdjm-tasks11.8699.27
All Templates /wp-admin/edit.php?post_type=email_template12.04108.63
Custom Client Fields /wp-admin/admin.php?page=mdjm-custom-client-fields11.7890.04
Event Types /wp-admin/edit-tags.php?taxonomy=event-types&post_type=mdjm-event11.84108.72
Extensions /wp-admin/edit.php?post_type=mdjm-event&page=mdjm-addons12.552,975.64
Create Event /wp-admin/post-new.php?post_type=mdjm-event11.97129.95

Server storage [IO: ▲11.74MB] [DB: ▲0.15MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 731 new files
Database: 2 new tables, 18 new options
New tables
wp_mdjm_availabilitymeta
wp_mdjm_availability
New WordPress options
mdjm_settings
transaction-types_children
mdjm_client_fields
widget_recent-posts
event-types_children
theysaidso_admin_options
can_compress_scripts
venue-details_children
mdjm_version
playlist-category_children
...

Browser metrics Passed 4 tests

Checking browser requirements for MDJM Event Management
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,747 ▲98513.83 ▼0.5410.29 ▲8.7037.60 ▼4.06
Dashboard /wp-admin2,862 ▲6825.85 ▲0.21103.18 ▲7.7588.42 ▲46.20
Posts /wp-admin/edit.php2,597 ▲4972.50 ▲0.4943.79 ▲2.2536.59 ▲0.68
Add New Post /wp-admin/post-new.php1,694 ▲16818.31 ▼5.40623.05 ▲24.0532.39 ▼20.93
Media Library /wp-admin/upload.php1,937 ▲5404.45 ▲0.36101.45 ▼0.3190.30 ▲44.20
Enquiry Sources /wp-admin/edit-tags.php?taxonomy=enquiry-source&post_type=mdjm-event2,1152.0737.6848.15
MDJM Upgrades /wp-admin/admin.php?page=mdjm-upgrades1,2702.2938.5127.85
All Events /wp-admin/edit.php?post_type=mdjm-event1,6612.4738.6232.62
All Transactions /wp-admin/edit.php?post_type=mdjm-transaction1,6952.3637.8731.38
Automated Tasks /wp-admin/edit.php?post_type=mdjm-event&page=mdjm-tasks1,6001.9235.6232.61
All Templates /wp-admin/edit.php?post_type=email_template2,6442.5446.8635.88
Custom Client Fields /wp-admin/admin.php?page=mdjm-custom-client-fields1,6452.3939.6529.54
Event Types /wp-admin/edit-tags.php?taxonomy=event-types&post_type=mdjm-event2,7492.2438.8044.42
Extensions /wp-admin/edit.php?post_type=mdjm-event&page=mdjm-addons1,6462.0833.6359.03
Create Event /wp-admin/post-new.php?post_type=mdjm-event4,2463.1078.2578.10

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie tables were found after uninstall: 2 tables
    • wp_mdjm_availability
    • wp_mdjm_availabilitymeta
  • Zombie WordPress options were found after uninstall: 18 options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • venue-details_children
    • theysaidso_admin_options
    • event-types_children
    • playlist-category_children
    • mdjm_schedules
    • wp_mdjm_availability_db_version
    • ...

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=mdjm-event
    • > Notice in wp-content/plugins/mobile-dj-manager/includes/travel-functions.php+290
    Undefined variable: event

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 14× GET requests to PHP files return non-empty strings (only 10 are shown):
    • > /wp-content/plugins/mobile-dj-manager/includes/admin/users/class-mdjm-users.php
    • > /wp-content/plugins/mobile-dj-manager/includes/admin/communications/comms.php
    • > /wp-content/plugins/mobile-dj-manager/includes/admin/templates/contracts.php
    • > /wp-content/plugins/mobile-dj-manager/includes/admin/users/class-mdjm-client-manager.php
    • > /wp-content/plugins/mobile-dj-manager/includes/admin/events/quotes.php
    • > /wp-content/plugins/mobile-dj-manager/includes/admin/roles/class-mdjm-permissions.php
    • > /wp-content/plugins/mobile-dj-manager/includes/admin/users/class-mdjm-employee-manager.php
    • > /wp-content/plugins/mobile-dj-manager/includes/admin/transactions/txns.php
    • > /wp-content/plugins/mobile-dj-manager/assets/libs/phpqrcode/index.php
    • > /wp-content/plugins/mobile-dj-manager/includes/admin/roles/class-mdjm-roles.php
  • 28× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Warning
      require_once(MDJM_PLUGIN_DIR/includes/admin/settings/register-settings.php): failed to open stream: No such file or directory in wp-content/plugins/mobile-dj-manager/templates/payments/payments-items.php on line 14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/mobile-dj-manager/includes/admin/transactions/taxonomies.php:32
    • > PHP Warning
      require(MDJM_PLUGIN_DIR/includes/venue-functions.php): failed to open stream: No such file or directory in wp-content/plugins/mobile-dj-manager/includes/travel-functions.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/mobile-dj-manager/templates/event/event-none.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/mobile-dj-manager/templates/playlist/playlist-noevent.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_user_logged_in() in wp-content/plugins/mobile-dj-manager/templates/login/login-form.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/mobile-dj-manager/templates/quote/quote-noevent.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function mdjm_get_option() in wp-content/plugins/mobile-dj-manager/templates/payments/payments-cc.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/mobile-dj-manager/templates/availability/availability-vertical.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/mobile-dj-manager/templates/event/event-loop.php:17

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=mdjm-upgrades
    • > Network (severe)
    wp-admin/index.php?page=mdjm-about - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Tags: You are using too many tags: 26 tag instead of maximum 10
The official readme.txt might help

mobile-dj-manager/mobile-dj-manager.php Passed 13 tests

The main PHP script in "MDJM Event Management" version 1.7.2 is automatically included on every request by WordPress
72 characters long description:
The flexible event management solution for WordPress - not just for DJs!

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Almost there! Just fix the following issues
  • Even if your plugin relies on executable files (for example a companion app), never distribute executable files with your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/mobile-dj-manager/assets/libs/phpqrcode/tools/merge.bat
123,387 lines of code in 253 files:
LanguageFilesBlank linesComment linesLines of code
PHP18712,77018,84149,564
JavaScript292,7594,02146,514
CSS318931,09313,197
PO File24,3045,58811,412
SVG1002,671
Markdown111025
Bourne Shell1002
DOS Batch1002

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.37
Average class complexity32.78
▷ Minimum class complexity1.00
▷ Maximum class complexity292.00
Average method complexity3.94
▷ Minimum method complexity1.00
▷ Maximum method complexity46.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes95
▷ Abstract classes11.05%
▷ Concrete classes9498.95%
▷ Final classes00.00%
Methods1,026
▷ Static methods14313.94%
▷ Public methods87585.28%
▷ Protected methods10710.43%
▷ Private methods444.29%
Functions1,044
▷ Named functions1,03899.43%
▷ Anonymous functions60.57%
Constants112
▷ Global constants11199.11%
▷ Class constants10.89%
▷ Public constants1100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
81 PNG files occupy 1.53MB with 0.25MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/libs/phpqrcode/cache/frame_17.png0.21KB0.19KB▼ 6.64%
assets/libs/phpqrcode/cache/frame_8.png0.20KB0.19KB▼ 2.45%
assets/libs/phpqrcode/cache/frame_32.png0.26KB0.25KB▼ 4.20%
assets/images/screenshots/13-employee-list.png38.81KB14.02KB▼ 63.87%
assets/libs/phpqrcode/cache/frame_16.png0.21KB0.20KB▼ 4.74%