89% wp-modal-popup-with-cookie-integration

Code Review | WP Modal Popup with Cookie Integration

WordPress plugin WP Modal Popup with Cookie Integration scored89%from 54 tests.

About plugin

  • Plugin page: wp-modal-popup-wi...
  • Plugin version: 2.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.0.1
  • WordPress version: 6.3.1
  • First release: Feb 27, 2016
  • Latest release: Jul 22, 2022
  • Number of updates: 54
  • Update frequency: every 43.3 days
  • Top authors: anoopranawat (57.41%)Astoundify (24.07%)wponlinesupport (22.22%)

Code review

54 tests

User reviews

8 reviews

Install metrics

3,000+ active /69,901 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼4.27ms] Passed 4 tests

A check of server-side resources used by WP Modal Popup with Cookie Integration
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0836.44 ▼6.12
Dashboard /wp-admin3.38 ▲0.0743.58 ▼7.94
Posts /wp-admin/edit.php3.49 ▲0.1351.79 ▲4.93
Add New Post /wp-admin/post-new.php5.96 ▲0.0786.04 ▼5.65
Media Library /wp-admin/upload.php3.30 ▲0.0736.26 ▲2.64

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 15 new files
Database: no new tables, 8 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts
wmpci_options
wmpci_plugin_version
db_upgraded

Browser metrics Passed 4 tests

WP Modal Popup with Cookie Integration: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,918 ▲18313.59 ▼0.665.23 ▲3.3344.60 ▼3.20
Dashboard /wp-admin2,222 ▲314.86 ▼1.04108.10 ▼4.1339.73 ▼3.88
Posts /wp-admin/edit.php2,105 ▲162.00 ▼0.0640.40 ▲4.8436.61 ▲3.96
Add New Post /wp-admin/post-new.php1,546 ▲3223.11 ▲5.49634.61 ▲21.6253.96 ▲3.76
Media Library /wp-admin/upload.php1,407 ▲164.21 ▲0.0196.38 ▼3.5041.72 ▼2.07

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 8 options in the database
    • wmpci_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • wmpci_plugin_version

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Tags: There are too many tags (37 tag instead of maximum 10)
You can take inspiration from this readme.txt

wp-modal-popup-with-cookie-integration/wp-modal-popup.php 92% from 13 tests

Analyzing the main PHP file in "WP Modal Popup with Cookie Integration" version 2.4
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-modal-popup-with-cookie-integration.php" instead of "wp-modal-popup.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
There were no executable files found in this plugin888 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP9172268604
JavaScript26545191
CSS13593

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity12.67
▷ Minimum class complexity7.00
▷ Maximum class complexity20.00
Average method complexity3.69
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/close.png0.84KB0.85KB0.00%