10% popup-in-posts-pages

Code Review | Popup in Posts, Pages

WordPress plugin Popup in Posts, Pages scored10%from 54 tests.

About plugin

  • Plugin page: popup-in-posts-pages
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-5.3
  • WordPress version: 6.3.1
  • First release: Apr 20, 2017
  • Latest release: Aug 1, 2022
  • Number of updates: 7
  • Update frequency: every 275.6 days
  • Top authors: tazotodua (85.71%)ttodua (28.57%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /715 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
  • This plugin did not install gracefully
    • > Error in wp-content/plugins/popup-in-posts-pages/index.php+244
    Uncaught Error: Class 'WP_Plugins_List_Table' not found in wp-content/plugins/popup-in-posts-pages/index.php:244
    Stack trace:
    #0 wp-includes/class-wp-hook.php(312): {closure}()
    #1 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #2 wp-includes/plugin.php(517): WP_Hook->do_action()
    #3 wp-admin/includes/plugin.php(720): do_action()

Server metrics [RAM: ▲0.06MB] [CPU: ▼3.78ms] Passed 4 tests

An overview of server-side resources used by Popup in Posts, Pages
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0741.29 ▼0.10
Dashboard /wp-admin3.37 ▲0.0348.14 ▼10.18
Posts /wp-admin/edit.php3.49 ▲0.1347.54 ▲3.98
Add New Post /wp-admin/post-new.php5.96 ▲0.0790.92 ▼3.66
Media Library /wp-admin/upload.php3.29 ▲0.0734.39 ▼1.17
Popup in posts /wp-admin/options-general.php?page=pipp_opts_page3.2628.61

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Popup in Posts, Pages: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6013.23 ▼1.341.92 ▲0.2643.51 ▲3.80
Dashboard /wp-admin2,210 ▲184.88 ▼1.0197.74 ▼6.8744.68 ▼1.16
Posts /wp-admin/edit.php2,093 ▲42.02 ▼0.0442.66 ▲3.7036.92 ▼0.63
Add New Post /wp-admin/post-new.php6,246 ▲4,71819.25 ▲0.74822.30 ▲180.3051.62 ▲1.31
Media Library /wp-admin/upload.php1,392 ▲44.25 ▲0.0098.05 ▼5.4942.93 ▲0.36
Popup in posts /wp-admin/options-general.php?page=pipp_opts_page8182.0723.8527.56

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/popup-in-posts-pages/popup_script.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_multisite() in wp-content/plugins/popup-in-posts-pages/index.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
8 plugin tags: pages, content, page, insert, posts...

popup-in-posts-pages/index.php 92% from 13 tests

The primary PHP file in "Popup in Posts, Pages" version 1.2 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("popup-in-posts-pages.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected238 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP25530238

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.38
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%
Functions21
▷ Named functions1257.14%
▷ Anonymous functions942.86%
Constants10
▷ Global constants10100.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
1 PNG file occupies 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
bubble2.png36.81KB12.07KB▼ 67.21%