89% popup-anything-on-click

Code Review | Popup Anything - Popup for opt-ins and Lead Generation Conversions

WordPress plugin Popup Anything - Popup for opt-ins and Lead Generation Conversions scored89%from 54 tests.

About plugin

  • Plugin page: popup-anything-on...
  • Plugin version: 2.8
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.4.1
  • WordPress version: 6.3.1
  • First release: Jul 6, 2017
  • Latest release: Nov 24, 2023
  • Number of updates: 146
  • Update frequency: every 16.0 days
  • Top authors: wponlinesupport (78.08%)anoopranawat (22.6%)

Code review

54 tests

User reviews

83 reviews

Install metrics

50,000+ active /1,012,298 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.49MB] [CPU: ▼1.20ms] Passed 4 tests

Server-side resources used by Popup Anything - Popup for opt-ins and Lead Generation Conversions
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.96 ▲0.5045.48 ▲3.48
Dashboard /wp-admin3.84 ▲0.4950.14 ▼13.62
Posts /wp-admin/edit.php3.89 ▲0.5354.85 ▲6.71
Add New Post /wp-admin/post-new.php6.38 ▲0.4999.62 ▲1.85
Media Library /wp-admin/upload.php3.70 ▲0.4737.62 ▲3.50

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 100 new files
Database: no new tables, 10 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
wpos_anylc_site_uid
theysaidso_admin_options
popupaoc_plugin_version
popupaoc_options
wpos_anylc_redirect
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Popup Anything - Popup for opt-ins and Lead Generation Conversions
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /1,652 ▼1,09510.63 ▼4.025.81 ▲4.1917.11 ▼27.07
Dashboard /wp-admin2,221 ▲415.56 ▼0.1195.27 ▲2.0251.67 ▲8.96
Posts /wp-admin/edit.php2,125 ▲252.03 ▲0.0840.28 ▲1.8837.03 ▲2.91
Add New Post /wp-admin/post-new.php6,266 ▲4,73721.71 ▼1.89893.64 ▲247.5333.98 ▼16.44
Media Library /wp-admin/upload.php1,425 ▲254.25 ▲0.05104.71 ▲7.3140.45 ▲0.68

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
  • The uninstall procedure has failed, leaving 10 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • popupaoc_options
    • theysaidso_admin_options
    • wpos_anylc_site_uid
    • widget_theysaidso_widget
    • wpos_anylc_redirect
    • popupaoc_plugin_version

Smoke tests Passed 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 Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Tags: There are too many tags (16 tag instead of maximum 10)
  • Screenshots: No descriptions were found for these screenshots #5, #6, #7 in popup-anything-on-click/assets to your readme.txt
You can take inspiration from this readme.txt

popup-anything-on-click/popup-anything-on-click.php Passed 13 tests

Analyzing the main PHP file in "Popup Anything - Popup for opt-ins and Lead Generation Conversions" version 2.8
116 characters long description:
Display a modal popup on a page load or by clicking link, image or button. Also work with Gutenberg shortcode block.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin9,530 lines of code in 64 files:
LanguageFilesBlank linesComment linesLines of code
PHP501,1491,3145,615
SVG1002,671
JavaScript7240241808
CSS66045436

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity29.71
▷ Minimum class complexity1.00
▷ Maximum class complexity87.00
Average method complexity5.57
▷ Minimum method complexity1.00
▷ Maximum method complexity41.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes114.29%
Methods44
▷ Static methods12.27%
▷ Public methods4295.45%
▷ Protected methods00.00%
▷ Private methods24.55%
Functions66
▷ Named functions66100.00%
▷ Anonymous functions00.00%
Constants17
▷ Global constants17100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
28 PNG files occupy 0.57MB with 0.36MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/page-builder-icon.png40.77KB11.61KB▼ 71.53%
assets/images/geo-location.png20.37KB8.94KB▼ 56.13%
assets/images/model-popup.png13.19KB5.58KB▼ 57.68%
assets/images/wpos-team.png171.41KB48.35KB▼ 71.79%
assets/images/popup-icon/a-b-testing-popup.png10.38KB4.11KB▼ 60.43%