78% bf-modal

Code Review | BF Modal

WordPress plugin BF Modal scored78%from 54 tests.

About plugin

  • Plugin page: bf-modal
  • Plugin version: 1.1.3
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.2
  • WordPress version: 6.3.1
  • First release: Nov 6, 2021
  • Latest release: Apr 20, 2023
  • Number of updates: 8
  • Update frequency: every 66.6 days
  • Top authors: bornfight (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,854 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.19MB] [CPU: ▲1.38ms] Passed 4 tests

A check of server-side resources used by BF Modal
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.2144.97 ▲4.76
Dashboard /wp-admin3.53 ▲0.2353.16 ▲3.41
Posts /wp-admin/edit.php3.57 ▲0.2155.97 ▲7.50
Add New Post /wp-admin/post-new.php6.06 ▲0.1887.98 ▼10.14
Media Library /wp-admin/upload.php3.39 ▲0.1742.37 ▲7.98

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 64 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for BF Modal
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲8113.36 ▼1.004.17 ▲2.4939.87 ▼0.27
Dashboard /wp-admin2,222 ▲374.86 ▼1.01107.33 ▲2.2341.85 ▼1.78
Posts /wp-admin/edit.php2,105 ▲162.00 ▲0.0239.02 ▼1.1233.88 ▲0.42
Add New Post /wp-admin/post-new.php1,532 ▲1323.28 ▲0.09672.64 ▲9.9059.10 ▲8.80
Media Library /wp-admin/upload.php1,404 ▲164.27 ▲0.0696.68 ▼0.6944.78 ▼0.54

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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 items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/bf-modal/static/icons/icon-close.php
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/bf-modal/templates/admin/components/main-form.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/bf-modal/templates/modal.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/bf-modal/templates/admin/components/switcher.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_the_ID() in wp-content/plugins/bf-modal/templates/admin/pages/modal-meta-box.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'bfModalPlugin\\providers\\BFAdminOptionsProvider' not found in wp-content/plugins/bf-modal/templates/admin/main.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/bf-modal/templates/admin/components/other-options-form.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
These attributes need to be fixed:
  • Donate link: Invalid URI ("/")
You can look at the official readme.txt

bf-modal/bf-modal.php Passed 13 tests

The main PHP file in "BF Modal" ver. 1.1.3 adds more information about the plugin and also serves as the entry point for this plugin
26 characters long description:
Plugin for creating modals

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected11,387 lines of code in 60 files:
LanguageFilesBlank linesComment linesLines of code
JSON4009,456
PHP434104541,506
JavaScript96462330
Sass25048
Markdown124046
CSS1001

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity7.24
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.70
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces9
Interfaces1
Traits0
Classes24
▷ Abstract classes00.00%
▷ Concrete classes24100.00%
▷ Final classes00.00%
Methods92
▷ Static methods2729.35%
▷ Public methods8693.48%
▷ Protected methods11.09%
▷ Private methods55.43%
Functions11
▷ Named functions654.55%
▷ Anonymous functions545.45%
Constants19
▷ Global constants421.05%
▷ Class constants1578.95%
▷ Public constants15100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected