83% envypopup

Code Review | EnvyPopup - All-in-One Popup Management WordPress Plugin

WordPress plugin EnvyPopup - All-in-One Popup Management WordPress Plugin scored83%from 54 tests.

About plugin

  • Plugin page: envypopup
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.7
  • WordPress version: 6.3.1
  • First release: Oct 30, 2020
  • Latest release: Mar 14, 2021
  • Number of updates: 10
  • Update frequency: every 13.5 days
  • Top authors: envytheme (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /511 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.27MB] [CPU: ▲0.99ms] Passed 4 tests

An overview of server-side resources used by EnvyPopup - All-in-One Popup Management WordPress Plugin
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.76 ▲0.3039.09 ▼1.44
Dashboard /wp-admin3.56 ▲0.2646.06 ▼2.12
Posts /wp-admin/edit.php3.68 ▲0.3248.44 ▲4.18
Add New Post /wp-admin/post-new.php6.15 ▲0.2693.28 ▲12.18
Media Library /wp-admin/upload.php3.49 ▲0.2635.45 ▲3.33
Settings /wp-admin/edit.php?post_type=envypopup&page=envy_popup_options3.4532.62
Add New /wp-admin/post-new.php?post_type=envypopup3.6158.76
All Messages /wp-admin/edit.php?post_type=envypopup3.5334.54

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 45 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_envy_popup_widget_function
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by EnvyPopup - All-in-One Popup Management WordPress Plugin
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,953 ▲21813.70 ▼0.535.71 ▲3.7750.85 ▲8.05
Dashboard /wp-admin2,240 ▲524.86 ▲0.01111.39 ▲0.1542.57 ▼3.98
Posts /wp-admin/edit.php2,123 ▲342.01 ▼0.0139.58 ▲5.0136.32 ▼0.09
Add New Post /wp-admin/post-new.php1,546 ▲1323.43 ▲0.29596.09 ▼1.8456.57 ▼3.78
Media Library /wp-admin/upload.php1,422 ▲344.22 ▼0.0298.37 ▼2.8246.23 ▲3.26
Settings /wp-admin/edit.php?post_type=envypopup&page=envy_popup_options1,2222.0823.1827.27
Add New /wp-admin/post-new.php?post_type=envypopup2,5807.83175.4968.90
All Messages /wp-admin/edit.php?post_type=envypopup1,0842.0929.3229.97

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_envy_popup_widget_function

Smoke tests 75% from 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 50% 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 take a closer look at the following
  • 10× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/envypopup/includes/options/popup-button-js.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/envypopup/includes/envy-popup-widget.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/envypopup/includes/envy-popup-js-options.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/envypopup/includes/options/popup-timer-js.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/envypopup/includes/class-envy-popup.php:240
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/envypopup/includes/envy-popup-css-options.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/envypopup/includes/envy-popup-post-options.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/envypopup/includes/envy-popup-global-options.php:83
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/envypopup/public/partials/envy-popup-public-display.php:258
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/envypopup/includes/options/popup-animation-js.php:6

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 16 tag instead of maximum 10
You can take inspiration from this readme.txt

envypopup/envy-popup.php 85% from 13 tests

"EnvyPopup - All-in-One Popup Management WordPress Plugin" version 1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("envypopup.php" instead of "envy-popup.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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
No dangerous file extensions were detected5,162 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
SVG1002,671
PHP203115181,549
CSS57345857
JavaScript4212485

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity6.25
▷ Minimum class complexity1.00
▷ Maximum class complexity38.00
Average method complexity2.62
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods26
▷ Static methods27.69%
▷ Public methods2180.77%
▷ Protected methods00.00%
▷ Private methods519.23%
Functions44
▷ Named functions44100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/img/timer_long.png3.82KB2.32KB▼ 39.16%
public/img/timer.png2.39KB2.37KB▼ 0.98%