68% simple-popup-plugin

Code Review | Simple Popup Plugin

WordPress plugin Simple Popup Plugin scored 68% from 54 tests.

About plugin

  • Plugin page: simple-popup-plugin
  • Plugin version: 4.4
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-5.1
  • WordPress version: 5.8.1
  • First release: Jan 31, 2009
  • Latest release: Mar 6, 2019
  • Number of updates: 39
  • Update frequency: every 94.5 days
  • Top authors: grimmdude (87.18%)noahkagan (15.38%)

Code review

54 tests

User reviews

12 reviews

Install metrics

3,000+ active / 115,858 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▼0.87MB] [CPU: ▼180.42ms] Passed 4 tests

Analyzing server-side resources used by Simple Popup Plugin
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.88 ▲0.0440.98 ▲4.35
Dashboard /wp-admin2.78 ▼0.2824.51 ▼35.86
Posts /wp-admin/edit.php2.78 ▼0.3323.05 ▼28.50
Add New Post /wp-admin/post-new.php2.78 ▼2.6617.91 ▼644.82
Media Library /wp-admin/upload.php2.78 ▼0.2225.69 ▼12.51
Simple Popup Plugin /wp-admin/options-general.php?page=simple-popup-plugin/simple_popup_plugin.php2.7826.64

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 5 new options
New WordPress options
popup_window_left
popup_window_height
popup_window_top
popup_window_width
widget_simple_popup

Browser metrics Passed 4 tests

Checking browser requirements for Simple Popup Plugin
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,715 ▲11916.35 ▲0.539.12 ▲0.9355.44 ▲0.83
Dashboard /wp-admin2,975 ▲415.87 ▼0.07144.64 ▼10.91122.30 ▲7.62
Posts /wp-admin/edit.php2,744 ▲52.83 ▲0.0266.05 ▼4.8392.09 ▼1.92
Add New Post /wp-admin/post-new.php1,673 ▼1019.11 ▲0.77378.81 ▼39.93110.22 ▼8.36
Media Library /wp-admin/upload.php1,812 ▲55.00 ▼0.02155.18 ▼20.30160.19 ▲27.98
Simple Popup Plugin /wp-admin/options-general.php?page=simple-popup-plugin/simple_popup_plugin.php1,3982.2168.29108.96

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > User deprecated in wp-includes/functions.php+5495
    has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • This plugin did not uninstall successfully, leaving 5 options in the database
    • popup_window_top
    • popup_window_height
    • popup_window_width
    • popup_window_left
    • widget_simple_popup

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=simple-popup-plugin/simple_popup_plugin.php
    • > User deprecated in wp-includes/functions.php+5495
    has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.

SRP 50% from 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
Almost there! Just fix the following items
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/simple-popup-plugin/simple-popup-widget.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/simple-popup-plugin/simple_popup_admin.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/simple-popup-plugin/simple-popup-widget.php:7

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)
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Screenshots: Add an image for screenshot #1 (Screenshot of the options menu.)
You can look at the official readme.txt

simple-popup-plugin/simple_popup_plugin.php 85% from 13 tests

The main file in "Simple Popup Plugin" v. 4.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("simple-popup-plugin.php" instead of "simple_popup_plugin.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 168 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin252 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP32435252

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity5.50
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png47.86KB15.44KB▼ 67.73%