78% ez-popups

Code Review | EZ POPUPS

WordPress plugin EZ POPUPS scored78%from 54 tests.

About plugin

  • Plugin page: ez-popups
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 1.0+
  • WordPress version: 6.3.1
  • First release: Mar 22, 2016
  • Latest release: Mar 22, 2016
  • Number of updates: 20
  • Update frequency: every 2.6 days
  • Top authors: Yashiro (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /948 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.11ms] Passed 4 tests

Server-side resources used by EZ POPUPS
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.89 ▲2.44
Dashboard /wp-admin3.32 ▲0.0147.06 ▼0.66
Posts /wp-admin/edit.php3.37 ▲0.0145.08 ▼4.30
Add New Post /wp-admin/post-new.php5.90 ▲0.0184.04 ▼12.97
Media Library /wp-admin/upload.php3.24 ▲0.0137.71 ▲1.49
ezPopups /wp-admin/options-general.php?page=ezp_settings3.1828.11
/wp-admin/admin.php?page=ezp_save_settings3.1827.60

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
ezp_html
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

EZ POPUPS: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5814.78 ▲0.401.97 ▲0.2444.71 ▼2.84
Dashboard /wp-admin2,210 ▲254.85 ▼1.02111.46 ▲11.3444.75 ▲2.78
Posts /wp-admin/edit.php2,093 ▲42.02 ▲0.0236.17 ▼6.7230.44 ▼6.15
Add New Post /wp-admin/post-new.php1,517 ▼017.53 ▼0.04674.20 ▲4.2857.24 ▼3.11
Media Library /wp-admin/upload.php1,386 ▼24.21 ▲0.02108.37 ▲10.6846.51 ▲3.39
ezPopups /wp-admin/options-general.php?page=ezp_settings7812.0523.7725.89
/wp-admin/admin.php?page=ezp_save_settings1,3302.2728.2424.69

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • ezp_html
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ezp_save_settings
    • > Notice in wp-content/plugins/ez-popups/ezpopups-integration.php+41
    Undefined variable: parse
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ezp_save_settings
    • > Notice in wp-content/plugins/ez-popups/ezpopups-integration.php+41
    Trying to access array offset on value of type null
    • > GET request to /wp-admin/admin.php?page=ezp_save_settings
    • > Notice in wp-content/plugins/ez-popups/ezpopups-integration.php+21
    Undefined index: html

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ez-popups/ezpopups-integration.php:12

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)
Everything seems fine, but this is not an exhaustive test

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
Attributes that require attention:
  • Screenshots: Add images for these screenshots: #1 (EZ POPUPS settings under Settings > EZ POPUPS), #2 (An example of an overlay popup), #3 (You can embed a popup right inside your content using shortcodes or easily add two step opt-in functionality)
You can look at the official readme.txt

ez-popups/ezpopups-integration.php 92% from 13 tests

"EZ POPUPS" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
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 ("ez-popups.php" instead of "ezpopups-integration.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected43 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP191043

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.00
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.62MB with 0.43MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png161.90KB44.98KB▼ 72.22%
screenshot-3.png426.47KB120.55KB▼ 71.73%
screenshot-1.png42.34KB15.11KB▼ 64.31%