78% wp-pop-up

Code Review | WP Popup

WordPress plugin WP Popup scored 78% from 54 tests.

About plugin

  • Plugin page: wp-pop-up
  • Plugin version: 1.2.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-6.2
  • WordPress version: 6.3.1
  • First release: Jan 11, 2019
  • Latest release: Jun 5, 2023
  • Number of updates: 28
  • Update frequency: every 58.1 days
  • Top authors: drywallbmb (42.86%)cornershop (25%)kenjigarland (21.43%)rxnlabs (17.86%)rpasillas (7.14%)

Code review

54 tests

User reviews

3 reviews

Install metrics

800+ active / 7,576 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
Installer ran successfully

Server metrics [RAM: ▲0.23MB] [CPU: ▼2.89ms] Passed 4 tests

A check of server-side resources used by WP Popup
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1243.22 ▼1.71
Dashboard /wp-admin3.58 ▲0.2747.71 ▼0.42
Posts /wp-admin/edit.php3.63 ▲0.2747.16 ▲3.47
Add New Post /wp-admin/post-new.php6.20 ▲0.3189.66 ▼12.90
Media Library /wp-admin/upload.php3.50 ▲0.2741.20 ▲10.67
Create New Popup /wp-admin/post-new.php?post_type=wp_popup6.3193.28
All Popups /wp-admin/edit.php?post_type=wp_popup3.5536.89

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

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

Browser metrics Passed 4 tests

WP Popup: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,951 ▲20513.82 ▼0.556.89 ▲4.9937.47 ▼13.85
Dashboard /wp-admin2,246 ▲555.88 ▲1.0096.51 ▼8.0836.60 ▼10.52
Posts /wp-admin/edit.php2,132 ▲402.10 ▲0.0535.74 ▼6.2031.69 ▼4.81
Add New Post /wp-admin/post-new.php1,558 ▲1717.80 ▼0.59675.80 ▲55.9036.24 ▼23.75
Media Library /wp-admin/upload.php1,428 ▲404.32 ▲0.1297.47 ▲5.4743.71 ▲0.32
Create New Popup /wp-admin/post-new.php?post_type=wp_popup7,48220.72883.2162.50
All Popups /wp-admin/edit.php?post_type=wp_popup1,1092.0735.7328.79

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
  • 6× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wp-pop-up/wp-popup.php
    • > /wp-content/plugins/wp-pop-up/classes/class-wp-popup-activate.php
    • > /wp-content/plugins/wp-pop-up/classes/class-wp-popup.php
    • > /wp-content/plugins/wp-pop-up/templates/popup.php
    • > /wp-content/plugins/wp-pop-up/classes/class-wp-popup-admin-fields.php
    • > /wp-content/plugins/wp-pop-up/classes/class-wp-popup-custom-fields.php
  • 41× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/wp-pop-up/includes/CMB2/includes/types/CMB2_Type_Multi_Base.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Hookup_Base' not found in wp-content/plugins/wp-pop-up/includes/CMB2/includes/CMB2_Hookup.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Picker_Base' not found in wp-content/plugins/wp-pop-up/includes/CMB2/includes/types/CMB2_Type_Text_Date.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Hookup_Base' not found in wp-content/plugins/wp-pop-up/includes/CMB2/includes/rest-api/CMB2_REST.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text_Date' not found in wp-content/plugins/wp-pop-up/includes/CMB2/includes/types/CMB2_Type_Text_Time.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function cmb2_dir() in wp-content/plugins/wp-pop-up/includes/CMB2/includes/rest-api/CMB2_REST_Controller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_File_Base' not found in wp-content/plugins/wp-pop-up/includes/CMB2/includes/types/CMB2_Type_File_List.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Textarea' not found in wp-content/plugins/wp-pop-up/includes/CMB2/includes/types/CMB2_Type_Wysiwyg.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Multi_Base' not found in wp-content/plugins/wp-pop-up/includes/CMB2/includes/types/CMB2_Type_Taxonomy_Base.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Select' not found in wp-content/plugins/wp-pop-up/includes/CMB2/includes/types/CMB2_Type_Select_Timezone.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 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
3 plugin tags: modal window, popup, lightbox

wp-pop-up/wp-popup.php 85% from 13 tests

The main PHP file in "WP Popup" ver. 1.2.5 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-pop-up.php" instead of "wp-popup.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin54,443 lines of code in 237 files:
LanguageFilesBlank linesComment linesLines of code
PO File12014,31518,50232,323
PHP652,4897,0418,920
CSS152781,1934,725
JSON3004,297
JavaScript134286491,952
Sass17306291,411
Markdown42690815

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.46
Average class complexity19.99
▷ Minimum class complexity1.00
▷ Maximum class complexity188.00
Average method complexity3.31
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes73
▷ Abstract classes912.33%
▷ Concrete classes6487.67%
▷ Final classes00.00%
Methods601
▷ Static methods9816.31%
▷ Public methods50183.36%
▷ Protected methods8914.81%
▷ Private methods111.83%
Functions37
▷ Named functions3697.30%
▷ Anonymous functions12.70%
Constants11
▷ Global constants436.36%
▷ Class constants763.64%
▷ Public constants7100.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
14 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/CMB2/images/ico-delete.png0.70KB0.72KB0.00%
includes/CMB2/images/ui-bg_glass_75_dadada_1x400.png0.11KB0.16KB0.00%
includes/CMB2/images/ui-icons_cd0a0a_256x240.png4.27KB4.11KB▼ 3.78%
includes/CMB2/images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%
includes/CMB2/images/ui-bg_glass_55_fbf9ee_1x400.png0.12KB0.14KB0.00%