67% bootstrap-modal-popup

Code Review | Bootstrap modal popup

WordPress plugin Bootstrap modal popup scored67%from 54 tests.

About plugin

  • Plugin page: bootstrap-modal-p...
  • Plugin version: 0.4
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Aug 4, 2014
  • Latest release: Sep 16, 2014
  • Number of updates: 9
  • Update frequency: every 5.4 days
  • Top authors: akora (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,094 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼1.21MB] [CPU: ▼45.36ms] Passed 4 tests

Server-side resources used by Bootstrap modal popup
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.77 ▼0.6913.83 ▼25.32
Dashboard /wp-admin2.81 ▼0.5316.54 ▼46.16
Posts /wp-admin/edit.php2.82 ▼0.5415.84 ▼27.53
Add New Post /wp-admin/post-new.php2.81 ▼3.0715.02 ▼82.41
Media Library /wp-admin/upload.php2.81 ▼0.4116.82 ▼18.62
Bootstrap modal popup /wp-admin/options-general.php?page=bmp-setting-admin2.8215.32

Server storage [IO: ▲0.84MB] [DB: ▲0.07MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
bmp_options
widget_recent-posts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Bootstrap modal popup
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,828 ▲8214.69 ▲0.352.25 ▲0.5547.55 ▲4.93
Dashboard /wp-admin2,199 ▲255.63 ▲0.0695.88 ▼5.9742.98 ▼0.14
Posts /wp-admin/edit.php2,104 ▲12.03 ▲0.0535.73 ▼4.4636.31 ▲2.94
Add New Post /wp-admin/post-new.php1,529 ▲323.10 ▼0.07672.26 ▲2.5556.33 ▼1.41
Media Library /wp-admin/upload.php1,407 ▲104.24 ▲0.0495.31 ▼20.2745.57 ▼3.82
Bootstrap modal popup /wp-admin/options-general.php?page=bmp-setting-admin1,5516.61135.9459.95

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Warning in wp-content/plugins/bootstrap-modal-popup/bootstrap_modal_popup.php+47
    Illegal string offset 'cookie_timeout'
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • bmp_options
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=bmp-setting-admin
    • > Warning in wp-content/plugins/bootstrap-modal-popup/bootstrap_modal_popup.php+47
    Illegal string offset 'cookie_timeout'
    • > GET request to /wp-admin/options-general.php?page=bmp-setting-admin
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=bmp-setting-admin
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

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
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/bootstrap-modal-popup/bootstrap_modal_popup.php:38

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Add images for these screenshots: #1 (Example of popup), #2 (Admin view)
The official readme.txt might help

bootstrap-modal-popup/bootstrap_modal_popup.php 85% from 13 tests

"Bootstrap modal popup" version 0.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Description: Make the plugin description longer than 10 characters (currently 5 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("bootstrap-modal-popup.php" instead of "bootstrap_modal_popup.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin265 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP16474265

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity2.07
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods15100.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 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.83MB with 0.56MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png326.72KB108.87KB▼ 66.68%
screenshot-1.png524.92KB171.16KB▼ 67.39%