67% page-expire-popup

Code Review | Page Expire Popup/Redirection for WordPress

WordPress plugin Page Expire Popup/Redirection for WordPress scored67%from 54 tests.

About plugin

  • Plugin page: page-expire-popup
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.0
  • WordPress version: 6.3.1
  • First release: Dec 29, 2021
  • Latest release: Jun 4, 2022
  • Number of updates: 5
  • Update frequency: every 31.6 days
  • Top authors: vikasratudi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /755 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.19MB] [CPU: ▼26.01ms] Passed 4 tests

An overview of server-side resources used by Page Expire Popup/Redirection for WordPress
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.43 ▼0.0426.02 ▼18.82
Dashboard /wp-admin3.10 ▼0.2029.67 ▼25.98
Posts /wp-admin/edit.php3.24 ▼0.1136.87 ▼19.44
Add New Post /wp-admin/post-new.php5.48 ▼0.4071.65 ▼39.81
Media Library /wp-admin/upload.php3.19 ▼0.0433.79 ▼3.49
More /wp-admin/admin.php?page=vfpageexpirepopup-more3.0929.75
Page Expire Popup /wp-admin/admin.php?page=vfpageexpirepopup3.0930.70

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Page Expire Popup/Redirection for WordPress
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,902 ▲14113.84 ▼0.438.17 ▲6.0739.46 ▼7.56
Dashboard /wp-admin2,232 ▲585.64 ▲0.0198.94 ▼5.3639.67 ▼7.69
Posts /wp-admin/edit.php2,134 ▲312.13 ▲0.1552.58 ▲7.8136.20 ▼3.15
Add New Post /wp-admin/post-new.php1,555 ▲2723.24 ▲0.21701.48 ▲21.7550.90 ▼0.81
Media Library /wp-admin/upload.php1,434 ▲344.18 ▼0.04108.51 ▲3.7643.68 ▼1.27
More /wp-admin/admin.php?page=vfpageexpirepopup-more8612.0138.6024.21
Page Expire Popup /wp-admin/admin.php?page=vfpageexpirepopup1,6232.0533.9028.58

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie tables were found after uninstall: 1 table
    • wp_pexpirep
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=vfpageexpirepopup
    • > User notice in wp-includes/functions.php+5905
    Function WP_Scripts::localize was called incorrectly. The $l10n parameter must be an array. To pass arbitrary data to scripts, use the wp_add_inline_script() function instead. Please see Debugging in WordPress for more information. (This message was added in version 5.7.0.)

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 6× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/page-expire-popup/uninstall.php
    • > /wp-content/plugins/page-expire-popup/inc/db.php
    • > /wp-content/plugins/page-expire-popup/inc/vfpepcomingsoon.php
    • > /wp-content/plugins/page-expire-popup/pageexpirepopup.php
    • > /wp-content/plugins/page-expire-popup/inc/vfpepstructure.php
    • > /wp-content/plugins/page-expire-popup/inc/vfpageexpirepopupstructure.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Contributors: Plugin contributors not specified
  • Tags: Please reduce the number of tags, currently 32 tag instead of maximum 10
The official readme.txt might help

page-expire-popup/pageexpirepopup.php 85% from 13 tests

The principal PHP file in "Page Expire Popup/Redirection for WordPress" v. 1.0 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("page-expire-popup.php" instead of "pageexpirepopup.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
There were no executable files found in this plugin887 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP712137717
CSS12089
JavaScript123376
SVG1005

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.18
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%
Functions12
▷ Named functions1083.33%
▷ Anonymous functions216.67%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/upgrade.png24.26KB11.96KB▼ 50.70%