10% nertworks-super-mega-popup

Code Review | NertWorks Super Mega Popup

WordPress plugin NertWorks Super Mega Popup scored 10% from 54 tests.

About plugin

  • Plugin page: nertworks-super-m...
  • Plugin version: 2.20
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0-4.0
  • WordPress version: 5.8.1
  • First release: Jan 2, 2014
  • Latest release: Nov 5, 2014
  • Number of updates: 57
  • Update frequency: every 5.6 days
  • Top authors: nertworks (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 7,366 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
You still need to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/nertworks-super-mega-popup/nertworks-super-mega-popup.php+12
    Undefined index: cookie_action

Server metrics [RAM: ▼1.69MB] [CPU: ▼190.96ms] Passed 4 tests

An overview of server-side resources used by NertWorks Super Mega Popup
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /1.94 ▼0.789.18 ▼15.70
Dashboard /wp-admin1.96 ▼1.106.04 ▼45.49
Posts /wp-admin/edit.php1.96 ▼1.155.40 ▼37.66
Add New Post /wp-admin/post-new.php1.96 ▼3.486.87 ▼649.58
Media Library /wp-admin/upload.php1.96 ▼1.055.85 ▼31.09
Super Mega /wp-admin/options-general.php?page=super_mega-options1.966.50
Popups /wp-admin/edit.php?post_type=popups1.965.95
Add New /wp-admin/post-new.php?post_type=popups1.965.70

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 96 new files
Database: no new tables, 17 new options
New WordPress options
super_mega_popup_enabled
colorbox_popup_height
super_mega_popup_multi_site_all
super_mega_popup_source
super_mega_popup_colorbox_theme
super_mega_popup_message1_heading
popup_selection
super_mega_include_stylesheets
super_mega_popup_multi_site_enabled
super_mega_colobox_mode
...

Browser metrics Passed 4 tests

A check of browser resources used by NertWorks Super Mega Popup
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,920 ▲34816.66 ▲0.6746.75 ▲35.5455.25 ▲4.38
Dashboard /wp-admin3,010 ▲795.92 ▼0.05153.14 ▲4.60110.48 ▼1.52
Posts /wp-admin/edit.php2,779 ▲402.73 ▲0.0273.03 ▼10.1888.00 ▼7.43
Add New Post /wp-admin/post-new.php1,709 ▲2618.38 ▼0.41470.31 ▲48.30128.89 ▲14.00
Media Library /wp-admin/upload.php1,847 ▲405.07 ▲0.03176.36 ▲11.39136.53 ▼14.77
Super Mega /wp-admin/options-general.php?page=super_mega-options1,7802.7882.02105.83
Popups /wp-admin/edit.php?post_type=popups2,1522.6897.0788.24
Add New /wp-admin/post-new.php?post_type=popups2,8708.99230.26135.11

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/nertworks-super-mega-popup/nertworks-super-mega-popup.php+12
    Undefined index: cookie_action
  • The uninstall procedure has failed, leaving 17 options in the database
    • super_mega_popup_message1_heading
    • super_mega_popup_colorbox_theme
    • super_mega_popup_multi_site_enabled
    • super_mega_popup_enabled
    • super_mega_popup_message1
    • super_mega_theme_jquery_enabled
    • super_mega_popup_multi_site_all
    • super_mega_popup_source
    • colorbox_popup_show_when_logged_in
    • popup_selection
    • ...

Smoke tests 0% 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)
These errors were triggered by the plugin
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=popups
    • > Notice in wp-content/plugins/nertworks-super-mega-popup/nertworks-super-mega-popup.php+12
    Undefined index: cookie_action
    • > GET request to /wp-admin/options-general.php?page=super_mega-options
    • > Notice in wp-content/plugins/nertworks-super-mega-popup/nertworks-super-mega-popup.php+195
    Undefined index: tab

SRP 0% 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
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/nertworks-super-mega-popup/iframe.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Rewrite' not found in wp-content/plugins/nertworks-super-mega-popup/nertworks-super-mega-popup.php:11

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There are user-side issues you should fix
    • > GET request to /wp-admin/options-general.php?page=super_mega-options
    • > Javascript (severe) in unknown
    /wp-admin/options-general.php?page=super_mega-options 224:19 Uncaught TypeError: jQuery(...).slider is not a function

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% 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
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (Screenshot of the Settings Page.), #2 (Screenshot of the Popup Editor. Includes all Wordpress Editor features and plugs right into your Media Library.), #3 (Screenshot of the Builtin Colorbox Options.)
  • Tags: Please delete some tags, you are using 18 tag instead of maximum 10
You can look at the official readme.txt

nertworks-super-mega-popup/nertworks-super-mega-popup.php Passed 13 tests

This is the main PHP file of "NertWorks Super Mega Popup" version 2.20, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
66 characters long description:
Plugin for showing a popup on a specific url or an entire webpage.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin2,719 lines of code in 54 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript412793981,456
PHP211895541
Markdown11680359
CSS62465208
HTML211194
JSON20061

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.38
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%
Functions13
▷ Named functions13100.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

All PNG images should be compressed to minimize bandwidth usage for end users
22 PNG files occupy 0.97MB with 0.52MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/colorbox/example5/images/border.png0.16KB0.16KB0.00%
images/icon.png3.80KB1.31KB▼ 65.40%
inc/colorbox/example4/images/border1.png1.03KB0.82KB▼ 20.34%
screenshot-1.png304.88KB41.45KB▼ 86.40%
images/colorbox_example2.png33.71KB1.53KB▼ 95.47%