72% wp-post-modal

Code Review | WP Post Popup

WordPress plugin WP Post Popup scored72%from 54 tests.

About plugin

  • Plugin page: wp-post-modal
  • Plugin version: 3.7.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.2
  • WordPress version: 6.3.1
  • First release: Mar 22, 2017
  • Latest release: Mar 28, 2023
  • Number of updates: 94
  • Update frequency: every 23.3 days
  • Top authors: allurewebsolutions (100%)

Code review

54 tests

User reviews

109 reviews

Install metrics

7,000+ active /158,584 total downloads

Benchmarks

Plugin footprint 82% 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 gracefully, with no errors

Server metrics [RAM: ▲0.21MB] [CPU: ▲294.46ms] 75% from 4 tests

An overview of server-side resources used by WP Post Popup
Please have a look at the following items
  • Extra CPU: The extra CPU usage must be under 200.00ms (currently 294.46ms on /wp-admin/options-general.php?page=wp-post-modal)
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1847.65 ▲3.66
Dashboard /wp-admin3.56 ▲0.26449.06 ▲397.08
Posts /wp-admin/edit.php3.61 ▲0.26455.33 ▲406.31
Add New Post /wp-admin/post-new.php6.11 ▲0.22486.57 ▲392.20
Media Library /wp-admin/upload.php3.42 ▲0.19422.93 ▲384.90
WP Post Popup /wp-admin/options-general.php?page=wp-post-modal3.39436.08

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 26 new files
Database: no new tables, 9 new options
New WordPress options
wp_post_modal_breakpoint
db_upgraded
wp_post_modal_button
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
wp_post_modal_wrapping
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by WP Post Popup
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,945 ▲18413.87 ▼0.489.98 ▲8.0642.26 ▼0.50
Dashboard /wp-admin2,257 ▲805.59 ▼0.0396.00 ▼4.1345.22 ▲1.18
Posts /wp-admin/edit.php2,166 ▲662.15 ▲0.1936.27 ▼1.6539.57 ▲3.59
Add New Post /wp-admin/post-new.php1,585 ▲5718.18 ▼5.01640.15 ▼43.1574.37 ▲24.16
Media Library /wp-admin/upload.php1,465 ▲684.21 ▲0.02107.43 ▲2.0046.80 ▲3.82
WP Post Popup /wp-admin/options-general.php?page=wp-post-modal1,1041.9629.9736.63

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
These items require your attention
  • The uninstall procedure has failed, leaving 9 options in the database
    • wp_post_modal_breakpoint
    • widget_recent-posts
    • can_compress_scripts
    • wp_post_modal_wrapping
    • widget_recent-comments
    • wp_post_modal_button
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wp-post-modal/public/partials/wp-post-modal-public-display.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/wp-post-modal/admin/partials/wp-post-modal-admin-display.php:19

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please take a look at the following user-side issues
    • > GET request to /wp-admin/options-general.php?page=wp-post-modal
    • > Network (severe)
    wp-content/plugins/images/var/www/wordpress/wp-content/plugins/wp-post-modal/admin/class-wp-post-modal-admin.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
2 plugin tags: modal, popup

wp-post-modal/wp-post-modal.php Passed 13 tests

The principal PHP file in "WP Post Popup" v. 3.7.3 is loaded by WordPress automatically on each request
128 characters long description:
This plugin allows any content to be pulled into a modal window dynamically. To use, just create a link with class "modal-link".

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
Success! There were no dangerous files found in this plugin1,414 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP12183710707
JavaScript35078407
CSS23913190
Markdown1350110

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity5.14
▷ Minimum class complexity1.00
▷ Maximum class complexity13.00
Average method complexity1.45
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods52
▷ Static methods23.85%
▷ Public methods4790.38%
▷ Protected methods00.00%
▷ Private methods59.62%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin