10% pop-up-homepage

Code Review | Homepage Pop-up

WordPress plugin Homepage Pop-up scored10%from 54 tests.

About plugin

  • Plugin page: pop-up-homepage
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1.0-2.0.1
  • WordPress version: 6.3.1
  • First release: Jun 28, 2018
  • Latest release: Feb 12, 2021
  • Number of updates: 6
  • Update frequency: every 160.0 days
  • Top authors: omsuhani (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,028 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Parse error in wp-content/plugins/pop-up-homepage/hpup.php+40
    syntax error, unexpected end of file

Server metrics [RAM: ▼0.01MB] [CPU: ▼5.46ms] Passed 4 tests

This is a short check of server-side resources used by Homepage Pop-up
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.41 ▼1.41
Dashboard /wp-admin3.31 ▼0.0456.79 ▼3.75
Posts /wp-admin/edit.php3.36 ▲0.0048.56 ▲0.18
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.68 ▼15.66
Media Library /wp-admin/upload.php3.23 ▲0.0035.18 ▼1.01

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Homepage Pop-up
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.72 ▲0.121.68 ▲0.0241.14 ▼1.32
Dashboard /wp-admin2,198 ▲215.58 ▲0.0385.55 ▼4.0735.25 ▼1.33
Posts /wp-admin/edit.php2,100 ▼01.95 ▼0.0636.55 ▼3.5431.35 ▼5.83
Add New Post /wp-admin/post-new.php1,526 ▼023.65 ▲0.62624.47 ▲12.4868.15 ▼7.35
Media Library /wp-admin/upload.php1,403 ▲64.23 ▲0.0295.61 ▼6.0340.45 ▼3.10

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
Please fix the following
  • 7× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Notice
      Undefined variable: updateData in wp-content/plugins/pop-up-homepage/includes/functions.php on line 92
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/pop-up-homepage/views/popup.php:7
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/pop-up-homepage/includes/functions.php on line 1
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-includes/pluggable.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/pop-up-homepage/includes/functions.php on line 1
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/pop-up-homepage/views/popup.php on line 6
    • > PHP Parse error
      syntax error, unexpected end of file in wp-content/plugins/pop-up-homepage/hpup.php on line 40
    • > PHP Warning
      include_once(ABSPATHwp-includes/pluggable.php): failed to open stream: No such file or directory in wp-content/plugins/pop-up-homepage/includes/functions.php on line 1

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 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Screenshots: These screenshots do not have images: #1 (Creating simple pop-up in the admin interface), #2 (Preview on Admin page), #3 (Result on the homepage)
You can take inspiration from this readme.txt

pop-up-homepage/hpup.php 92% from 13 tests

This is the main PHP file of "Homepage Pop-up" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("pop-up-homepage.php" instead of "hpup.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected682 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP59432324
PO File24082128
CSS121121
JavaScript21972109

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity5.00
▷ Minimum method complexity5.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods1
▷ Static methods1100.00%
▷ Public methods1100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
4 PNG files occupy 1.31MB with 0.59MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png636.47KB189.71KB▼ 70.19%
screenshot-3.png636.47KB189.71KB▼ 70.19%
images/close_pop.png2.65KB1.87KB▼ 29.73%
screenshot-2.png67.88KB61.25KB▼ 9.76%