78% pop-up-pop-up

Code Review | Pop-up

WordPress plugin Pop-up scored78%from 54 tests.

About plugin

  • Plugin page: pop-up-pop-up
  • Plugin version: 1.2.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.4
  • WordPress version: 6.3.1
  • First release: Nov 7, 2020
  • Latest release: Nov 7, 2023
  • Number of updates: 44
  • Update frequency: every 25.1 days
  • Top authors: iclyde (50%)popups (43.18%)mypopups (6.82%)popupshelp (6.82%)

Code review

54 tests

User reviews

69 reviews

Install metrics

10,000+ active /200,077 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.51MB] [CPU: ▲2.05ms] Passed 4 tests

An overview of server-side resources used by Pop-up
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.98 ▲0.5246.46 ▲5.99
Dashboard /wp-admin3.81 ▲0.5055.68 ▲4.05
Posts /wp-admin/edit.php3.91 ▲0.5552.38 ▼0.28
Add New Post /wp-admin/post-new.php6.40 ▲0.5194.15 ▼1.55
Media Library /wp-admin/upload.php3.73 ▲0.5046.48 ▲11.20

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 136 new files
Database: no new tables, 8 new options
New WordPress options
db_upgraded
analyst_cache
widget_recent-comments
_irb_h_bn_review
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Pop-up
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,115 ▲35314.10 ▼0.031.90 ▲0.2847.61 ▲3.26
Dashboard /wp-admin2,491 ▲3145.58 ▼0.0893.48 ▼2.0977.66 ▲35.69
Posts /wp-admin/edit.php2,417 ▲3172.06 ▲0.1037.28 ▼4.4539.31 ▲1.21
Add New Post /wp-admin/post-new.php1,880 ▲35422.22 ▼0.56784.26 ▲134.6549.35 ▼10.94
Media Library /wp-admin/upload.php1,696 ▲2964.25 ▲0.1098.28 ▼4.7368.96 ▲27.15

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin does not fully uninstall, leaving 8 options in the database
    • _irb_h_bn_review
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • analyst_cache
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% 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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 5× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/pop-up-pop-up/analyst/templates/forms/deactivate.php
    • > /wp-content/plugins/pop-up-pop-up/views/main.php
    • > /wp-content/plugins/pop-up-pop-up/analyst/templates/optout.php
    • > /wp-content/plugins/pop-up-pop-up/analyst/templates/forms/install.php
    • > /wp-content/plugins/pop-up-pop-up/analyst/templates/optin.php
  • 24× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Analyst\\Contracts\\RequestContract' not found in wp-content/plugins/pop-up-pop-up/analyst/src/Http/Requests/AbstractLoggerRequest.php:10
    • > PHP Notice
      Undefined variable: shieldImage in wp-content/plugins/pop-up-pop-up/analyst/templates/optout.php on line 6
    • > PHP Fatal error
      Uncaught Error: Class 'Analyst\\Core\\AbstractFactory' not found in wp-content/plugins/pop-up-pop-up/analyst/src/Account/AccountDataFactory.php:15
    • > PHP Notice
      Undefined variable: smileImage in wp-content/plugins/pop-up-pop-up/analyst/templates/forms/deactivate.php on line 11
    • > PHP Fatal error
      Uncaught Error: Interface 'Analyst\\Contracts\\HttpClientContract' not found in wp-content/plugins/pop-up-pop-up/analyst/src/Http/DummyHttpClient.php:8
    • > PHP Notice
      Undefined variable: pluginToInstall in wp-content/plugins/pop-up-pop-up/analyst/templates/forms/install.php on line 1
    • > PHP Fatal error
      Uncaught Error: Class 'Analyst\\Http\\Requests\\AbstractLoggerRequest' not found in wp-content/plugins/pop-up-pop-up/analyst/src/Http/Requests/UninstallRequest.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/pop-up-pop-up/analyst/sdk_resolver.php:21
    • > PHP Fatal error
      Uncaught Error: Interface 'Analyst\\Contracts\\AnalystContract' not found in wp-content/plugins/pop-up-pop-up/analyst/src/Analyst.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'Analyst\\Contracts\\CacheContract' not found in wp-content/plugins/pop-up-pop-up/analyst/src/Cache/DatabaseCache.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Screenshots: These screenshots lack descriptions #1, #2, #3, #4, #5, #6, #7 in pop-up-pop-up/assets to your readme.txt
You can take inspiration from this readme.txt

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

The main PHP file in "Pop-up" ver. 1.2.2 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 168 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin4,918 lines of code in 107 files:
LanguageFilesBlank linesComment linesLines of code
PHP649881,5463,155
CSS513651,048
JavaScript58112369
SVG3302346

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity5.67
▷ Minimum class complexity1.00
▷ Maximum class complexity60.00
Average method complexity1.82
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces9
Interfaces6
Traits0
Classes24
▷ Abstract classes28.33%
▷ Concrete classes2291.67%
▷ Final classes00.00%
Methods199
▷ Static methods2211.06%
▷ Public methods16582.91%
▷ Protected methods105.03%
▷ Private methods2412.06%
Functions36
▷ Named functions1336.11%
▷ Anonymous functions2363.89%
Constants11
▷ Global constants872.73%
▷ Class constants327.27%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
28 PNG files occupy 0.30MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
modules/banner/views/projects/cdp/imgs/big-colored-logo.png0.75KB0.73KB▼ 3.00%
modules/banner/views/projects/red/imgs/big-colored-logo-rr.png8.54KB4.02KB▼ 52.89%
modules/banner/views/projects/mpu/imgs/big-colored-logo.png2.94KB2.92KB▼ 0.73%
modules/banner/views/projects/bmi/imgs/background-images.png4.10KB4.09KB0.07%
analyst/assets/img/shield_question.png22.05KB11.19KB▼ 49.26%