78% mz-mindbody-api

Code Review | MZ Mindbody API

WordPress plugin MZ Mindbody API scored78%from 54 tests.

About plugin

  • Plugin page: mz-mindbody-api
  • Plugin version: 2.9.9
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.2.2
  • WordPress version: 6.3.1
  • First release: Sep 19, 2014
  • Latest release: Jun 23, 2023
  • Number of updates: 222
  • Update frequency: every 14.4 days
  • Top authors: mikeill (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

100+ active /10,000 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: ▲1.14MB] [CPU: ▲0.54ms] Passed 4 tests

Server-side resources used by MZ Mindbody API
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.53 ▲1.0747.86 ▲3.13
Dashboard /wp-admin4.51 ▲1.2158.00 ▲4.98
Posts /wp-admin/edit.php4.56 ▲1.2160.83 ▲10.62
Add New Post /wp-admin/post-new.php7.03 ▲1.1490.93 ▼16.15
Media Library /wp-admin/upload.php4.35 ▲1.1245.00 ▲10.19
MZ Mindbody /wp-admin/options-general.php?page=mz_mindbody_settings4.3541.83

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 241 new files
Database: no new tables, 11 new options
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
mz_mbo_events
widget_recent-posts
mz_mbo_shortcodes
mz_mbo_api_calls
mz_mbo_basic
widget_theysaidso_widget
mz_mbo_advanced
...

Browser metrics Passed 4 tests

MZ Mindbody API: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,950 ▲18915.03 ▲0.671.76 ▼0.1944.29 ▼1.74
Dashboard /wp-admin2,356 ▲1856.37 ▲0.70114.94 ▲15.9839.47 ▼4.19
Posts /wp-admin/edit.php2,285 ▲1853.53 ▲1.5655.68 ▲19.6932.04 ▼2.38
Add New Post /wp-admin/post-new.php1,382 ▼14417.22 ▼6.27497.47 ▼178.9427.87 ▼34.24
Media Library /wp-admin/upload.php1,427 ▲304.28 ▲0.0384.99 ▼32.4144.08 ▼4.03
MZ Mindbody /wp-admin/options-general.php?page=mz_mindbody_settings1,5333.4249.9140.89

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
  • This plugin did not uninstall successfully, leaving 11 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • mz_mbo_shortcodes
    • mz_mbo_events
    • widget_recent-comments
    • mz_mbo_basic
    • widget_theysaidso_widget
    • mz_mbo_api_calls
    • widget_recent-posts
    • can_compress_scripts
    • ...

Smoke tests 50% 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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 7× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/mz-mindbody-api/src/Frontend/views/event_listing_full.php
    • > /wp-content/plugins/mz-mindbody-api/src/Frontend/views/staff_list_horizontal.php
    • > /wp-content/plugins/mz-mindbody-api/src/Frontend/views/client_schedule.php
    • > /wp-content/plugins/mz-mindbody-api/src/Admin/views/html-mz-mindbody-admin-display.php
    • > /wp-content/plugins/mz-mindbody-api/src/Frontend/views/staff_list_gallery.php
    • > /wp-content/plugins/mz-mindbody-api/src/Frontend/views/schedule_container.php
    • > /wp-content/plugins/mz-mindbody-api/mz-mindbody.php
  • 188× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/mz-mindbody-api/vendor/composer/installers/src/Composer/Installers/MODULEWorkInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'MZoo\\MzMindbody\\Common\\Interfaces\\ShortcodeScriptLoader' not found in wp-content/plugins/mz-mindbody-api/src/Schedule/Display.php:22
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/mz-mindbody-api/src/Frontend/views/grid_schedule.php on line 34
    • > PHP Fatal error
      Uncaught Error: Class 'MZoo\\MzMindbody\\Common\\Interfaces\\Retrieve' not found in wp-content/plugins/mz-mindbody-api/src/Client/RetrieveClient.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/mz-mindbody-api/vendor/composer/installers/src/Composer/Installers/DframeInstaller.php:5
    • > PHP Warning
      count(): Parameter must be an array or an object that implements Countable in wp-content/plugins/mz-mindbody-api/src/Frontend/views/event_listing_full.php on line 71
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/mz-mindbody-api/src/Frontend/views/schedule_container.php on line 18
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/mz-mindbody-api/vendor/composer/installers/src/Composer/Installers/AimeosInstaller.php:4
    • > PHP Notice
      Trying to get property 'events' of non-object in wp-content/plugins/mz-mindbody-api/src/Frontend/views/event_listing_full.php on line 34
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installer\\LibraryInstaller' not found in wp-content/plugins/mz-mindbody-api/vendor/composer/installers/src/Composer/Installers/Installer.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes: The official readme.txt might help

mz-mindbody-api/mz-mindbody.php 92% from 13 tests

The principal PHP file in "MZ Mindbody API" v. 2.9.9 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("mz-mindbody-api.php" instead of "mz-mindbody.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin39,883 lines of code in 206 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript97,2697,18426,793
PHP1792,4256,2658,984
CSS2231621,829
PO File35076911,290
JSON300377
Bourne Shell37278288
Markdown2510161
YAML3303118
XML2111543

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity6.32
▷ Minimum class complexity1.00
▷ Maximum class complexity63.00
Average method complexity2.93
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces19
Interfaces0
Traits0
Classes152
▷ Abstract classes53.29%
▷ Concrete classes14796.71%
▷ Final classes00.00%
Methods410
▷ Static methods225.37%
▷ Public methods30574.39%
▷ Protected methods5413.17%
▷ Private methods5112.44%
Functions27
▷ Named functions1037.04%
▷ Anonymous functions1762.96%
Constants12
▷ Global constants866.67%
▷ Class constants433.33%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 compressed PNG files occupy 0.00MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
dist/images/controls.png1.23KB1.28KB0.00%
dist/images/border.png0.07KB0.10KB0.00%
dist/images/overlay.png0.11KB0.15KB0.00%