78% simple-popup-manager

Code Review | Simple Popup Manager

WordPress plugin Simple Popup Manager scored 78% from 54 tests.

About plugin

  • Plugin page: simple-popup-manager
  • Plugin version: 1.3.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.3.1
  • WordPress version: 6.3.1
  • First release: Oct 8, 2012
  • Latest release: Oct 8, 2015
  • Number of updates: 26
  • Update frequency: every 42.2 days
  • Top authors: mbcreation (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

1,000+ active / 52,075 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼7.51ms] Passed 4 tests

A check of server-side resources used by Simple Popup Manager
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.38 ▼0.0725.64 ▼15.08
Dashboard /wp-admin3.33 ▲0.0346.33 ▼2.09
Posts /wp-admin/edit.php3.38 ▲0.0343.14 ▼2.07
Add New Post /wp-admin/post-new.php5.91 ▲0.0388.11 ▼10.81
Media Library /wp-admin/upload.php3.25 ▲0.0333.98 ▼0.09
Popup Settings /wp-admin/options-general.php?page=simple_popup_manager3.2030.53

Server storage [IO: ▲0.03MB] [DB: ▲0.07MB] Passed 3 tests

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

Browser metrics Passed 4 tests

A check of browser resources used by Simple Popup Manager
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲9413.33 ▼1.052.11 ▲0.2146.54 ▼1.55
Dashboard /wp-admin2,207 ▲225.81 ▲0.8799.94 ▼0.9640.96 ▼0.66
Posts /wp-admin/edit.php2,096 ▲42.01 ▲0.0135.49 ▲0.5631.82 ▼0.10
Add New Post /wp-admin/post-new.php1,528 ▼1423.37 ▲5.23675.68 ▲20.5656.10 ▼0.18
Media Library /wp-admin/upload.php1,392 ▲44.20 ▲0.0294.82 ▼0.7644.88 ▼0.99
Popup Settings /wp-admin/options-general.php?page=simple_popup_manager1,6566.60135.3761.46

Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 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 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

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/options-general.php?page=simple_popup_manager
    • > Notice in wp-content/plugins/simple-popup-manager/index.php+79
    Undefined index: largeur
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=simple_popup_manager
    • > Notice in wp-content/plugins/simple-popup-manager/index.php+72
    Undefined index: cookie
    • > GET request to /wp-admin/options-general.php?page=simple_popup_manager
    • > Notice in wp-content/plugins/simple-popup-manager/index.php+81
    Undefined index: hauteur
    • > GET request to /wp-admin/options-general.php?page=simple_popup_manager
    • > Notice in wp-content/plugins/simple-popup-manager/index.php+90
    Undefined index: bgcolor
    • > GET request to /wp-admin/options-general.php?page=simple_popup_manager
    • > Notice in wp-content/plugins/simple-popup-manager/index.php+94
    Undefined index: opacite
    • > GET request to /wp-admin/options-general.php?page=simple_popup_manager
    • > Notice in wp-content/plugins/simple-popup-manager/index.php+101
    Undefined index: contenu

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 take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/simple-popup-manager/index.php:17

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 on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: popup, message, plugin, cookie, jquery...

simple-popup-manager/index.php 92% from 13 tests

"Simple Popup Manager" version 1.3.5'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: Name the main plugin file the same as the plugin slug ("simple-popup-manager.php" instead of "index.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
Success! There were no dangerous files found in this plugin423 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP25723190
PO File2462112
CSS36364
JavaScript2111557

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.40
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
css/images/spm-close-icon.png1.64KB1.28KB▼ 22.06%