77% mind-body-api-integration

Code Review | mind-body

WordPress plugin mind-body scored77%from 54 tests.

About plugin

  • Plugin page: mind-body-api-int...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-4.0
  • WordPress version: 6.3.1
  • First release: Oct 2, 2014
  • Latest release: Oct 7, 2014
  • Number of updates: 12
  • Update frequency: every 11.2 days
  • Top authors: vimes1984 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,619 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼7.71ms] Passed 4 tests

Analyzing server-side resources used by mind-body
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0837.22 ▼1.49
Dashboard /wp-admin3.40 ▲0.0645.48 ▼16.90
Posts /wp-admin/edit.php3.51 ▲0.1651.57 ▲7.26
Add New Post /wp-admin/post-new.php5.98 ▲0.1090.02 ▼9.98
Media Library /wp-admin/upload.php3.32 ▲0.1033.21 ▼2.48

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 1,087 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by mind-body
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲7213.74 ▼0.531.64 ▼0.2938.73 ▼5.58
Dashboard /wp-admin2,225 ▲404.86 ▼1.00104.84 ▼16.0041.62 ▼3.23
Posts /wp-admin/edit.php2,105 ▲161.97 ▼0.0839.31 ▲2.1635.43 ▼0.59
Add New Post /wp-admin/post-new.php1,546 ▲1322.96 ▼0.08651.73 ▼3.8549.53 ▼3.87
Media Library /wp-admin/upload.php1,398 ▲74.21 ▼0.0195.32 ▼13.4940.02 ▼4.91

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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 WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
  • 4× PHP files output text when accessed directly:
    • > /wp-content/plugins/mind-body-api-integration/views/cal.php
    • > /wp-content/plugins/mind-body-api-integration/workflows/bookClientIntoFinderClass.php
    • > /wp-content/plugins/mind-body-api-integration/views/calwidget.php
    • > /wp-content/plugins/mind-body-api-integration/views/adminview/staff.php
  • 13× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/mind-body-api-integration/views/adminview/options.php:1
    • > PHP Warning
      require_once(mbapi.php): failed to open stream: No such file or directory in wp-content/plugins/mind-body-api-integration/includes/appointmentService.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'soapclient' not found in wp-content/plugins/mind-body-api-integration/includes/classService.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/mind-body-api-integration/views/public.php:14
    • > PHP Fatal error
      require_once(): Failed opening required 'mbapi.php' (include_path='.:/usr/share/php') in wp-content/plugins/mind-body-api-integration/includes/clientService.php on line 2
    • > PHP Warning
      require_once(mbapi.php): failed to open stream: No such file or directory in wp-content/plugins/mind-body-api-integration/includes/clientService.php on line 2
    • > PHP Fatal error
      require_once(): Failed opening required 'mbapi.php' (include_path='.:/usr/share/php') in wp-content/plugins/mind-body-api-integration/includes/clientService.php on line 2
    • > PHP Fatal error
      require_once(): Failed opening required 'mbapi.php' (include_path='.:/usr/share/php') in wp-content/plugins/mind-body-api-integration/includes/appointmentService.php on line 2
    • > PHP Fatal error
      require_once(): Failed opening required 'mbapi.php' (include_path='.:/usr/share/php') in wp-content/plugins/mind-body-api-integration/includes/appointmentService.php on line 2
    • > PHP Warning
      require_once(mbapi.php): failed to open stream: No such file or directory in wp-content/plugins/mind-body-api-integration/includes/clientService.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% 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:
  • Screenshots: Add images for these screenshots: #1 (This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Note that the screenshot is taken from), #2 (This is the second screen shot)
Please take inspiration from this readme.txt

mind-body-api-integration/mind-body.php 85% from 13 tests

The primary PHP file in "mind-body" version 1.0.0 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("mind-body-api-integration.php" instead of "mind-body.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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
Success! There were no dangerous files found in this plugin132,587 lines of code in 610 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript44914,73122,07688,086
CSS1111,8602,46039,768
PHP276351,1523,402
Markdown63340863
JSON1730468

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity25.57
▷ Minimum class complexity1.00
▷ Maximum class complexity109.00
Average method complexity4.02
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes17.14%
▷ Concrete classes1392.86%
▷ Final classes00.00%
Methods114
▷ Static methods32.63%
▷ Public methods9986.84%
▷ Protected methods54.39%
▷ Private methods108.77%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants17
▷ Global constants15.88%
▷ Class constants1694.12%
▷ Public constants16100.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
369 PNG files occupy 0.96MB with 0.32MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
app/bower_components/jquery-ui/themes/smoothness/images/ui-icons_2e83ff_256x240.png4.49KB4.20KB▼ 6.46%
app/bower_components/jquery-ui/themes/base/minified/images/ui-bg_flat_75_ffffff_40x100.png0.17KB0.08KB▼ 51.12%
app/bower_components/jquery-ui/themes/south-street/images/ui-icons_cd0a0a_256x240.png4.49KB4.20KB▼ 6.46%
app/bower_components/jquery-ui/themes/cupertino/images/ui-bg_highlight-hard_70_000000_1x100.png0.29KB0.17KB▼ 42.00%
app/bower_components/jquery-ui/themes/overcast/images/ui-bg_flat_55_c0402a_40x100.png0.27KB0.11KB▼ 57.66%