84% flexible-modals

Code Review | Flexible Modals

WordPress plugin Flexible Modals scored84%from 54 tests.

About plugin

  • Plugin page: flexible-modals
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.9.1
  • WordPress version: 6.3.1
  • First release: Jul 22, 2014
  • Latest release: Jul 24, 2014
  • Number of updates: 5
  • Update frequency: every 0.4 days
  • Top authors: bagerathan (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

80+ active /6,072 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.05MB] [CPU: ▼7.24ms] Passed 4 tests

Analyzing server-side resources used by Flexible Modals
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0640.70 ▼1.72
Dashboard /wp-admin3.35 ▲0.0546.15 ▼5.13
Posts /wp-admin/edit.php3.40 ▲0.0544.60 ▼5.71
Add New Post /wp-admin/post-new.php5.93 ▲0.0580.60 ▼15.94
Media Library /wp-admin/upload.php3.27 ▲0.0436.70 ▼2.17
Add New /wp-admin/post-new.php?post_type=modal3.3847.51
All Modals /wp-admin/edit.php?post_type=modal3.3237.00

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

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

Browser metrics Passed 4 tests

Flexible Modals: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,938 ▲19213.59 ▼0.798.96 ▲7.2242.27 ▼0.62
Dashboard /wp-admin2,233 ▲454.86 ▼1.01109.82 ▼5.5839.59 ▼5.65
Posts /wp-admin/edit.php2,116 ▲272.01 ▲0.0235.98 ▼2.7334.63 ▲2.25
Add New Post /wp-admin/post-new.php1,556 ▲2323.31 ▲0.14685.56 ▼19.8149.37 ▼25.30
Media Library /wp-admin/upload.php1,415 ▲274.17 ▲0.0198.96 ▼11.2141.19 ▼6.14
Add New /wp-admin/post-new.php?post_type=modal2,1637.60169.9162.04
All Modals /wp-admin/edit.php?post_type=modal1,0721.9631.1128.69

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
Please fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/flexible-modals/flexible-modal.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/flexible-modals/inc/shortcodes.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: block, modal, popup

flexible-modals/flexible-modal.php 85% from 13 tests

This is the main PHP file of "Flexible Modals" version 0.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 247 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("flexible-modals.php" instead of "flexible-modal.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
Good job! No executable or dangerous file extensions detected716 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript17141358
CSS1350254
PHP31717104

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected