68% mb-spirit-for-mindbody

Code Review | MB Spirit for MINDBODY

WordPress plugin MB Spirit for MINDBODY scored68%from 54 tests.

About plugin

  • Plugin page: mb-spirit-for-min...
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0.0-6.3.2
  • WordPress version: 6.3.1
  • First release: Mar 12, 2016
  • Latest release: Oct 18, 2023
  • Number of updates: 75
  • Update frequency: every 37.0 days
  • Top authors: yogaboy (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /5,291 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.44MB] [CPU: ▼44.99ms] Passed 4 tests

A check of server-side resources used by MB Spirit for MINDBODY
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.55 ▼0.9111.87 ▼30.00
Dashboard /wp-admin2.57 ▼0.7314.17 ▼38.66
Posts /wp-admin/edit.php2.57 ▼0.7814.15 ▼29.88
Add New Post /wp-admin/post-new.php2.57 ▼3.3113.59 ▼81.40
Media Library /wp-admin/upload.php2.57 ▼0.6613.56 ▼17.38
Register /wp-admin/admin.php?page=mb_spirit_register2.5714.56
Manage Settings /wp-admin/admin.php?page=mb_spirit2.5720.08
Overview /wp-admin/admin.php?page=mb_spirit_mgmt2.5712.37

Server storage [IO: ▲0.13MB] [DB: ▲0.01MB] Passed 3 tests

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 16 new files
Database: no new tables, 8 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
mb_spirit_options
theysaidso_admin_options
db_upgraded
widget_mb_spirit_widget

Browser metrics Passed 4 tests

MB Spirit for MINDBODY: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,947 ▲20114.35 ▼0.081.72 ▲0.0442.25 ▼1.87
Dashboard /wp-admin2,353 ▲1735.61 ▼0.0488.55 ▼9.7642.06 ▼0.30
Posts /wp-admin/edit.php2,219 ▲1162.05 ▲0.0135.32 ▲0.1239.41 ▲7.57
Add New Post /wp-admin/post-new.php6,407 ▲4,87227.65 ▲9.50931.58 ▲280.2341.77 ▼23.29
Media Library /wp-admin/upload.php1,517 ▲1144.47 ▲0.31101.73 ▲8.5347.26 ▲7.00
Register /wp-admin/admin.php?page=mb_spirit_register1,40512.70223.9564.90
Manage Settings /wp-admin/admin.php?page=mb_spirit9731.9726.1831.02
Overview /wp-admin/admin.php?page=mb_spirit_mgmt1,3039.03214.6748.03

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in mb_spirit_widget is deprecated since version 4.3.0! Use __construct() instead.
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_mb_spirit_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mb_spirit_mgmt
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in mb_spirit_widget is deprecated since version 4.3.0! Use __construct() instead.
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mb_spirit_mgmt
    • > Notice in wp-content/plugins/mb-spirit-for-mindbody/mb-spirit.php+1270
    curl_setopt(): CURLOPT_SSL_VERIFYHOST no longer accepts the value 1, value 2 will be used instead

SRP 50% 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
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/mb-spirit-for-mindbody/mb-spirit.php

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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
9 plugin tags: calendar, events, staff, courses, api...

mb-spirit-for-mindbody/mb-spirit.php 92% from 13 tests

This is the main PHP file of "MB Spirit for MINDBODY" version 1.1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("mb-spirit-for-mindbody.php" instead of "mb-spirit.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
Good job! No executable or dangerous file extensions detected1,438 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP2703241,018
CSS1110168
JavaScript298144
SVG20291
JSON10017

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity118.50
▷ Minimum class complexity19.00
▷ Maximum class complexity218.00
Average method complexity5.83
▷ Minimum method complexity1.00
▷ Maximum method complexity44.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods49
▷ Static methods00.00%
▷ Public methods4693.88%
▷ Protected methods00.00%
▷ Private methods36.12%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
style/img/powered-by-mindbody.png8.59KB5.57KB▼ 35.16%
style/img/mb-spirit-logo.png23.74KB6.90KB▼ 70.93%
style/img/mb-spirit-icon-64.png3.57KB2.27KB▼ 36.46%
style/img/mb-spirit-icon-32.png1.59KB1.45KB▼ 8.71%