48% bmlt-workflow

Code Review | BMLT-Workflow

WordPress plugin BMLT-Workflow scored48%from 54 tests.

About plugin

  • Plugin page: bmlt-workflow
  • Plugin version: 1.1.10
  • PHP compatiblity: 8.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.3
  • WordPress version: 6.3.1
  • First release: Aug 19, 2022
  • Latest release: Nov 24, 2023
  • Number of updates: 43
  • Update frequency: every 10.8 days
  • Top authors: nigelbmlt (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,355 total downloads

Benchmarks

Plugin footprint 30% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.96MB] [CPU: ▼0.37ms] Passed 4 tests

A check of server-side resources used by BMLT-Workflow
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.38 ▲0.9246.68 ▲1.32
Dashboard /wp-admin4.28 ▲0.9852.97 ▼5.01
Posts /wp-admin/edit.php4.33 ▲0.9853.76 ▲4.85
Add New Post /wp-admin/post-new.php6.90 ▲1.0188.72 ▼2.63
Media Library /wp-admin/upload.php4.21 ▲0.9844.63 ▲8.84
Service Bodies /wp-admin/admin.php?page=bmltwf-service-bodies4.1839.67
Workflow Submissions /wp-admin/admin.php?page=bmltwf-submissions5.4146.09
Configuration /wp-admin/admin.php?page=bmltwf-settings4.2241.78

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 195 new files
Database: 3 new tables, 22 new options
New tables
wp_bmltwf_service_bodies_access
wp_bmltwf_submissions
wp_bmltwf_service_bodies
New WordPress options
bmltwf_optional_postcode
bmltwf_optional_location_sub_province_displayname
bmltwf_submitter_email_template
bmltwf_optional_location_province_displayname
bmltwf_optional_postcode_displayname
widget_theysaidso_widget
bmltwf_optional_location_sub_province
theysaidso_admin_options
bmltwf_optional_location_nation_displayname
db_upgraded
...

Browser metrics Passed 4 tests

BMLT-Workflow: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲7414.27 ▼0.071.81 ▼0.1046.76 ▲2.23
Dashboard /wp-admin2,226 ▲465.49 ▼0.1697.77 ▲3.8741.89 ▼5.68
Posts /wp-admin/edit.php2,131 ▲312.01 ▲0.0140.91 ▼0.9135.85 ▼2.22
Add New Post /wp-admin/post-new.php1,551 ▲2523.13 ▲0.13679.40 ▲71.8160.56 ▲6.76
Media Library /wp-admin/upload.php1,431 ▲314.19 ▼0.0595.58 ▼1.5840.91 ▼1.82
Service Bodies /wp-admin/admin.php?page=bmltwf-service-bodies7021.516.3418.72
Workflow Submissions /wp-admin/admin.php?page=bmltwf-submissions1,4692.2849.9128.12
Configuration /wp-admin/admin.php?page=bmltwf-settings2,3617.51193.05125.59

Uninstaller [IO: ▲2.29MB] [DB: ▲0.01MB] 0% from 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/bmlt-workflow/config.php+2
    Constant BMLTWF_DEBUG already defined
  • Incomplete uninstall procedure, leaving 195 files (2.29MB) in the plugin directory
    • (new file) LICENSE
    • (new file) admin/admin_submissions.php
    • (new file) README.md
    • (new file) bmlt-workflow.php
    • (new file) admin/admin_service_bodies.php
    • (new file) TRANSLATION.md
    • (new file) admin/admin_options.php
    • (new file) CHANGELOG.md
    • (new file) css/admin_options.css
    • (new file) config.php
    • ...
  • Zombie tables were found after uninstall: 3 tables
    • wp_bmltwf_submissions
    • wp_bmltwf_service_bodies_access
    • wp_bmltwf_service_bodies
  • Zombie WordPress options were found after uninstall: 23 options
    • bmltwf_fso_email_address
    • bmltwf_delete_closed_meetings
    • bmltwf_submitter_email_template
    • bmltwf_optional_location_nation_displayname
    • widget_theysaidso_widget
    • bmltwf_optional_location_nation
    • bmltwf_db_version
    • bmltwf_optional_location_province
    • theysaidso_admin_options
    • bmltwf_email_from_address
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
Please take a closer look at the following
  • 11× 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 get_option() in wp-content/plugins/bmlt-workflow/public/meeting_update_form.php:22
    • > PHP Fatal error
      Trait 'bmltwf\\BMLTWF_Debug' not found in wp-content/plugins/bmlt-workflow/src/REST/Handlers/BMLTServerHandler.php on line 25
    • > PHP Fatal error
      Trait 'bmltwf\\BMLTWF_Debug' not found in wp-content/plugins/bmlt-workflow/src/REST/Handlers/SubmissionsHandler.php on line 27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/bmlt-workflow/config.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/bmlt-workflow/config.php:3
    • > PHP Fatal error
      Trait 'bmltwf\\BMLTWF_Debug' not found in wp-content/plugins/bmlt-workflow/src/BMLTWF_WP_User.php on line 21
    • > PHP Fatal error
      Trait 'bmltwf\\BMLTWF_Debug' not found in wp-content/plugins/bmlt-workflow/src/REST/Handlers/ServiceBodiesHandler.php on line 24
    • > PHP Fatal error
      Trait 'bmltwf\\BMLTWF_Debug' not found in wp-content/plugins/bmlt-workflow/src/BMLTWF_Database.php on line 21
    • > PHP Fatal error
      Trait 'bmltwf\\BMLTWF_Debug' not found in wp-content/plugins/bmlt-workflow/src/BMLT/Integration.php on line 23
    • > PHP Fatal error
      Trait 'bmltwf\\BMLTWF_Debug' not found in wp-content/plugins/bmlt-workflow/src/REST/Handlers/OptionsHandler.php on line 26

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
    • > GET request to /wp-admin/admin.php?page=bmltwf-submissions
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: bmltwf_gmaps_key is not defined" "ReferenceError: bmltwf_gmaps_key is not defined\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/bmlt-workflow/js/admin_submissions.js?ver=1700803806:87:62)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/admin.php?page=bmltwf-submissions
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught ReferenceError: bmltwf_gmaps_key is not defined

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
2 plugin tags: bmlt, workflow

bmlt-workflow/bmlt-workflow.php Passed 13 tests

The main PHP file in "BMLT-Workflow" ver. 1.1.10 adds more information about the plugin and also serves as the entry point for this plugin
38 characters long description:
Workflows for BMLT meeting management!

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
Good job! No executable or dangerous file extensions detected26,591 lines of code in 176 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript753,0988,28712,818
CSS603082056,564
PHP191,0218604,681
PO File27178391,791
Markdown3760306
Sass2578264
Bourne Shell2201688
HTML21054
JSON110025

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity43.25
▷ Minimum class complexity1.00
▷ Maximum class complexity182.00
Average method complexity3.84
▷ Minimum method complexity1.00
▷ Maximum method complexity89.00
Code structure
Namespaces4
Interfaces0
Traits4
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods179
▷ Static methods00.00%
▷ Public methods13474.86%
▷ Protected methods00.00%
▷ Private methods4525.14%
Functions8
▷ Named functions225.00%
▷ Anonymous functions675.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.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
9 compressed PNG files occupy 0.15MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
thirdparty/DataTables/DataTables-1.12.1/images/sort_asc.png0.16KB0.25KB0.00%
thirdparty/DataTables/DataTables-1.12.1/images/sort_desc_disabled.png0.14KB0.25KB0.00%
images/Workflow_Banner.png47.59KB21.26KB▼ 55.33%
thirdparty/DataTables/DataTables-1.12.1/images/sort_both.png0.20KB0.29KB0.00%
thirdparty/DataTables/DataTables-1.12.1/images/sort_desc.png0.15KB0.25KB0.00%