84% boot-modal

Code Review | Boot-Modal

WordPress plugin Boot-Modal scored84%from 54 tests.

About plugin

  • Plugin page: boot-modal
  • Plugin version: 1.9.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.5
  • WordPress version: 6.3.1
  • First release: Jan 5, 2016
  • Latest release: Aug 21, 2020
  • Number of updates: 54
  • Update frequency: every 32.2 days
  • Top authors: albedo0 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /5,017 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.13MB] [CPU: ▼5.59ms] Passed 4 tests

Analyzing server-side resources used by Boot-Modal
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1241.92 ▼0.43
Dashboard /wp-admin3.45 ▲0.1448.07 ▼4.52
Posts /wp-admin/edit.php3.57 ▲0.2147.91 ▲0.58
Add New Post /wp-admin/post-new.php6.03 ▲0.1480.17 ▼17.62
Media Library /wp-admin/upload.php3.37 ▲0.1436.12 ▲0.21

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 24 new files
Database: no new tables, 7 new options
New WordPress options
bootmodal_plugin_options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Boot-Modal
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲8613.69 ▼0.714.41 ▲2.4043.38 ▼3.89
Dashboard /wp-admin2,225 ▲404.96 ▼0.90107.89 ▲5.5280.21 ▲35.43
Posts /wp-admin/edit.php2,105 ▲161.97 ▼0.0540.87 ▲2.3636.36 ▲0.11
Add New Post /wp-admin/post-new.php1,684 ▲15022.40 ▼1.05739.15 ▲125.8645.94 ▼15.60
Media Library /wp-admin/upload.php1,410 ▲224.23 ▲0.0398.71 ▲3.8147.13 ▲4.88

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • bootmodal_plugin_options
    • widget_theysaidso_widget

Smoke tests 75% 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 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
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/boot-modal/boot_modal.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
3 plugin tags: modal, shortcode, bootstrap

boot-modal/boot_modal.php 85% from 13 tests

This is the main PHP file of "Boot-Modal" version 1.9.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • 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
  • Main file name: The principal plugin file should be the same as the plugin slug ("boot-modal.php" instead of "boot_modal.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin1,705 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP310266609
JavaScript39345438
PO File2137157393
CSS4228163
Sass2100102

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity26.00
▷ Minimum class complexity20.00
▷ Maximum class complexity32.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods30
▷ Static methods00.00%
▷ Public methods30100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
4 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/logo_small.png1.23KB0.58KB▼ 52.61%
img/tinymce-icon.png1.73KB0.44KB▼ 74.41%
img/logo.png6.96KB2.96KB▼ 57.43%
img/logo_big.png1.81KB0.66KB▼ 63.44%