10% mobile-events-manager

Code Review | Mobile Events Manager

WordPress plugin Mobile Events Manager scored 10% from 54 tests.

About plugin

  • Plugin page: mobile-events-man...
  • Plugin version: 1.4.6
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.9
  • WordPress version: 5.8.1
  • First release: Dec 26, 2020
  • Latest release: Feb 20, 2022
  • Number of updates: 124
  • Update frequency: every 3.4 days
  • Top authors: jackjpdiscos (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 1,277 total downloads

Benchmarks

Plugin footprint 39% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
You still need to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/mobile-events-manager/includes/install.php+680
    Undefined index: type

Server metrics [RAM: ▲7.39MB] [CPU: ▼113.53ms] 25% from 4 tests

Analyzing server-side resources used by Mobile Events Manager
The following require your attention
  • RAM: Try to keep total memory usage under 10MB (currently 11.10MB on /wp-admin/edit.php?post_type=contract)
  • CPU: Total CPU usage must kept under 500.00ms (currently 2,107.45ms on /wp-admin/edit.php?post_type=tmem-event&page=tmem-addons)
  • Extra RAM: Extra memory usage should kept under 5MB (currently 7.39MB on /wp-admin/edit.php?post_type=contract)
PageMemory (MB)CPU Time (ms)
Home /8.39 ▲5.5581.11 ▲55.84
Dashboard /wp-admin11.07 ▲8.00161.26 ▲119.93
Posts /wp-admin/edit.php11.17 ▲8.0593.68 ▲57.00
Add New Post /wp-admin/post-new.php13.46 ▲8.01131.97 ▼617.75
Media Library /wp-admin/upload.php11.00 ▲8.0080.98 ▲50.81
TMEM Upgrades /wp-admin/admin.php?page=tmem-upgrades10.9580.20
Enquiry Sources /wp-admin/edit-tags.php?taxonomy=enquiry-source&post_type=tmem-event11.0280.98
Automated Tasks /wp-admin/edit.php?post_type=tmem-event&page=tmem-tasks11.0575.34
Settings /wp-admin/edit.php?post_type=tmem-event&page=tmem-settings11.1489.78
All Emails /wp-admin/edit.php?post_type=tmem_communication11.1191.11
All Transactions /wp-admin/edit.php?post_type=tmem-transaction11.1282.81
All Events /wp-admin/edit.php?post_type=tmem-event11.1383.03
Extensions /wp-admin/edit.php?post_type=tmem-event&page=tmem-addons11.032,107.45
Playlists /wp-admin/admin.php?page=tmem-playlists10.9573.08
All Contract Templates /wp-admin/edit.php?post_type=contract11.1081.94

Server storage [IO: ▲4.70MB] [DB: ▲0.08MB] Passed 3 tests

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 253 new files
Database: 2 new tables, 12 new options
New tables
wp_tmem_availability
wp_tmem_availabilitymeta
New WordPress options
tmem_client_fields
tmem_schedules
tmem_doing_upgrade
venue-details_children
transaction-types_children
wp_tmem_availability_db_version
playlist-category_children
wp_tmem_availabilitymeta_db_version
tmem_version
tmem_settings
...

Browser metrics Passed 4 tests

A check of browser resources used by Mobile Events Manager
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,881 ▲1,25517.31 ▲1.7210.95 ▲5.7278.12 ▲1.65
Dashboard /wp-admin3,806 ▲9076.56 ▲0.39128.31 ▼6.21199.21 ▲21.99
Posts /wp-admin/edit.php3,266 ▲5263.44 ▲0.2275.19 ▲10.50139.12 ▼3.87
Add New Post /wp-admin/post-new.php2,158 ▼1,64915.29 ▼3.83418.99 ▼36.02196.64 ▲35.35
Media Library /wp-admin/upload.php2,348 ▲5965.91 ▲0.41134.33 ▼1.56201.27 ▲18.88
TMEM Upgrades /wp-admin/admin.php?page=tmem-upgrades1,5753.1369.01108.58
Enquiry Sources /wp-admin/edit-tags.php?taxonomy=enquiry-source&post_type=tmem-event2,6933.1667.55138.46
Automated Tasks /wp-admin/edit.php?post_type=tmem-event&page=tmem-tasks2,0552.8663.77104.34
Settings /wp-admin/edit.php?post_type=tmem-event&page=tmem-settings2,0383.3174.47199.86
All Emails /wp-admin/edit.php?post_type=tmem_communication2,0323.3471.23112.79
All Transactions /wp-admin/edit.php?post_type=tmem-transaction2,0973.3068.48127.97
All Events /wp-admin/edit.php?post_type=tmem-event2,0783.3873.42117.50
Extensions /wp-admin/edit.php?post_type=tmem-event&page=tmem-addons1,7462.9267.92193.06
Playlists /wp-admin/admin.php?page=tmem-playlists1,1672.3242.2280.69
All Contract Templates /wp-admin/edit.php?post_type=contract2,6653.4474.57156.25

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The plugin did not uninstall successfully, leaving 2 tables in the database
    • wp_tmem_availability
    • wp_tmem_availabilitymeta
  • This plugin does not fully uninstall, leaving 12 options in the database
    • tmem_doing_upgrade
    • tmem_client_fields
    • wp_tmem_availabilitymeta_db_version
    • tmem_settings
    • wp_tmem_availability_db_version
    • widget_tmem_availability_widget
    • tmem_version
    • event-types_children
    • playlist-category_children
    • venue-details_children
    • ...

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)
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/edit.php?post_type=contract
    • > Warning in wp-content/plugins/mobile-events-manager/includes/admin/templates/contracts.php+80
    count(): Parameter must be an array or an object that implements Countable

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
Almost there! Just fix the following items
  • 13× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
    • > /wp-content/plugins/mobile-events-manager/includes/admin/pages/event-fields.php
    • > /wp-content/plugins/mobile-events-manager/includes/admin/venues/venues.php
    • > /wp-content/plugins/mobile-events-manager/includes/admin/communications/tmem-communications.php
    • > /wp-content/plugins/mobile-events-manager/includes/admin/transactions/txns.php
    • > /wp-content/plugins/mobile-events-manager/includes/admin/roles/class-tmem-permissions.php
    • > /wp-content/plugins/mobile-events-manager/includes/admin/templates/emails.php
    • > /wp-content/plugins/mobile-events-manager/includes/admin/events/quotes.php
    • > /wp-content/plugins/mobile-events-manager/includes/admin/roles/class-tmem-roles.php
    • > /wp-content/plugins/mobile-events-manager/includes/admin/communications/comms.php
    • > /wp-content/plugins/mobile-events-manager/includes/admin/users/class-tmem-users.php
  • 26× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/mobile-events-manager/templates/playlist/playlist-guest.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_user_logged_in() in wp-content/plugins/mobile-events-manager/templates/login/login-form.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/mobile-events-manager/templates/event/event-loop-footer.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/mobile-events-manager/includes/admin/transactions/taxonomies.php:38
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/mobile-events-manager/templates/event/event-loop.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/mobile-events-manager/templates/availability/availability-horizontal.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/mobile-events-manager/templates/playlist/playlist-client.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/mobile-events-manager/templates/contract/contract-signed.php:26
    • > PHP Fatal error
      require(): Failed opening required 'TMEM_PLUGIN_DIR/includes/venue-functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/mobile-events-manager/includes/travel-functions.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/mobile-events-manager/includes/admin/plugins.php:35

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following browser errors
    • > GET request to /wp-admin/admin.php?page=tmem-upgrades
    • > Network (severe)
    wp-admin/index.php?page=tmem-about - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (An overview of the Mobile Events Manager Dashboard screen as seen by an Administrator when they are logged into the WordPress Admin UI), #2 (The Dashboard as seen by an employee when they are logged in), #3 (A view of the settings page (not seen by non-admins)), #4 (Permissions can be set to determine what an employee can see/do within the application), #5 (Event listing within the Admin UI), #6 (The client's homepage on the website front end), #7 (The playlist feature as utilised by clients)
Please take inspiration from this readme.txt

mobile-events-manager/mobile-events-manager.php 92% from 13 tests

The entry point to "Mobile Events Manager" version 1.4.6 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

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
There were no executable files found in this plugin50,224 lines of code in 204 files:
LanguageFilesBlank linesComment linesLines of code
PHP16411,52817,31142,874
CSS193583173,950
JavaScript194352953,350
Markdown112026
JSON10024

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity33.64
▷ Minimum class complexity4.00
▷ Maximum class complexity158.00
Average method complexity4.09
▷ Minimum method complexity1.00
▷ Maximum method complexity46.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes61
▷ Abstract classes11.64%
▷ Concrete classes6098.36%
▷ Final classes00.00%
Methods644
▷ Static methods213.26%
▷ Public methods60293.48%
▷ Protected methods111.71%
▷ Private methods314.81%
Functions1,009
▷ Named functions1,00399.41%
▷ Anonymous functions60.59%
Constants15
▷ Global constants1493.33%
▷ Class constants16.67%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
29 PNG files occupy 0.26MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/ui-bg_highlight-hard_100_f4f0ec_1x100.png0.38KB0.15KB▼ 60.78%
assets/images/ui-bg_inset-soft_100_f4f0ec_1x100.png0.45KB0.17KB▼ 61.82%
assets/images/ui-icons_cb672b_256x240.png4.57KB4.18KB▼ 8.43%
assets/images/ui-bg_glass_25_cb842e_1x400.png0.38KB0.16KB▼ 58.27%
assets/images/ui-icons_21759b_256x240.png3.62KB4.11KB0.00%