94% very-simple-wp-popup

Code Review | Very Simple wp Popup

WordPress plugin Very Simple wp Popup scored 94% from 54 tests.

About plugin

  • Plugin page: very-simple-wp-popup
  • Plugin version: 1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.6
  • WordPress version: 5.8.1
  • First release: Jul 26, 2019
  • Latest release: Jan 2, 2021
  • Number of updates: 26
  • Update frequency: every 20.2 days
  • Top authors: jschaves (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 451 total downloads

Benchmarks

Plugin footprint Passed 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.01MB] [CPU: ▼141.83ms] Passed 4 tests

An overview of server-side resources used by Very Simple wp Popup
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1333.21 ▲11.59
Dashboard /wp-admin3.07 ▲0.0243.17 ▲0.14
Posts /wp-admin/edit.php3.12 ▲0.0143.51 ▼1.57
Add New Post /wp-admin/post-new.php5.43 ▲0.0090.72 ▼557.54
Media Library /wp-admin/upload.php3.01 ▲0.0031.20 ▼8.34
VSWP Popup /wp-admin/options-general.php?page=very-simple-wp-popup-settings3.0529.07

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 24 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Very Simple wp Popup
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,694 ▲9816.01 ▲0.559.62 ▲2.6548.07 ▼0.73
Dashboard /wp-admin2,977 ▲405.97 ▲0.04133.15 ▼16.13115.04 ▲3.64
Posts /wp-admin/edit.php2,749 ▲102.70 ▼0.0163.75 ▲3.2690.21 ▼4.27
Add New Post /wp-admin/post-new.php1,689 ▲1116.46 ▼2.31342.47 ▼13.67109.55 ▼12.86
Media Library /wp-admin/upload.php1,817 ▲75.05 ▲0.00158.98 ▲3.32119.78 ▼0.12
VSWP Popup /wp-admin/options-general.php?page=very-simple-wp-popup-settings1,4692.0950.3082.26

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
This plugin's uninstaller ran successfully

Smoke tests 75% 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
    • > GET request to /wp-admin/options-general.php?page=very-simple-wp-popup-settings
    • > Notice in wp-content/plugins/very-simple-wp-popup/shared/vswpp-class-deserializer.php+36
    Undefined variable: ouput

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
2 plugin tags: popup, pop-up

very-simple-wp-popup/very-simple-wp-popup-settings.php 92% from 13 tests

The principal PHP file in "Very Simple wp Popup" v. 1.6 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("very-simple-wp-popup.php" instead of "very-simple-wp-popup-settings.php")

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
Success! There were no dangerous files found in this plugin928 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP930252378
JavaScript26632328
CSS2189172
PO File1171750

PHP code Passed 2 tests

An short overview of 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.14
Average class complexity3.40
▷ Minimum class complexity1.00
▷ Maximum class complexity8.00
Average method complexity1.80
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods1386.67%
▷ Protected methods00.00%
▷ Private methods213.33%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.08MB with 0.06MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/img/left.png10.92KB1.11KB▼ 89.83%
public/img/right.png11.00KB1.11KB▼ 89.90%
admin/img/close.png30.04KB10.56KB▼ 64.85%
public/img/close.png30.04KB10.56KB▼ 64.85%