10% whats-new-popup-generator

Code Review | What's New Popup Generator

WordPress plugin What's New Popup Generator scored 10% from 54 tests.

About plugin

  • Plugin page: whats-new-popup-g...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Feb 4, 2018
  • Latest release: Feb 13, 2018
  • Number of updates: 38
  • Update frequency: every 0.5 days
  • Top authors: kazukiyanamoto (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 1,028 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5905
    Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)

Server metrics [RAM: ▼1.94MB] [CPU: ▼51.78ms] Passed 4 tests

Server-side resources used by What's New Popup Generator
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.04 ▼1.425.23 ▼38.20
Dashboard /wp-admin2.06 ▼1.245.73 ▼47.11
Posts /wp-admin/edit.php2.06 ▼1.296.70 ▼42.39
Add New Post /wp-admin/post-new.php2.06 ▼3.825.76 ▼79.42
Media Library /wp-admin/upload.php2.06 ▼1.175.44 ▼28.64
What`s Popup setting /wp-admin/options-general.php?page=Pop_up_Generator2.066.49

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 14 new options
New WordPress options
theysaidso_admin_options
popup_plugin_value_width
popup_plugin_value_btncolor
db_upgraded
popup_plugin_value_tag
widget_recent-comments
popup_plugin_value_shortcode
popup_plugin_value_whatscolor
popup_plugin_value_namecolor
popup_plugin_value_subject
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for What's New Popup Generator
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,955 ▲22013.78 ▼0.836.55 ▲4.7243.68 ▼4.34
Dashboard /wp-admin2,229 ▲415.19 ▼0.62112.61 ▼3.0239.52 ▼8.31
Posts /wp-admin/edit.php2,114 ▲252.31 ▲0.3240.18 ▲6.4233.68 ▲1.37
Add New Post /wp-admin/post-new.php1,533 ▼023.26 ▲0.17642.78 ▼27.3534.96 ▼25.22
Media Library /wp-admin/upload.php1,411 ▲234.48 ▲0.3294.26 ▼14.5642.51 ▼7.18
What`s Popup setting /wp-admin/options-general.php?page=Pop_up_Generator1,6054.2087.1756.29

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 notice in wp-includes/functions.php+5905
    Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • popup_plugin_value_shortcode

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=Pop_up_Generator
    • > User notice in wp-includes/functions.php+5905
    Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)
    • > GET request to /wp-admin/options-general.php?page=Pop_up_Generator
    • > Notice in wp-content/plugins/whats-new-popup-generator/manage/admin.php+17
    Undefined index: popup_save
    • > GET request to /wp-admin/options-general.php?page=Pop_up_Generator
    • > Warning in wp-content/plugins/whats-new-popup-generator/manage/admin.php+146
    Use of undefined constant popup_plugin_value_maxwidth - assumed 'popup_plugin_value_maxwidth' (this will throw an Error in a future version of PHP)
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=Pop_up_Generator
    • > Warning in wp-content/plugins/whats-new-popup-generator/manage/admin.php+210
    Use of undefined constant popup_plugin_value_tab - assumed 'popup_plugin_value_tab' (this will throw an Error in a future version of PHP)

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Notice
      Undefined index: popup_save in wp-content/plugins/whats-new-popup-generator/manage/admin.php on line 17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_kses() in wp-content/plugins/whats-new-popup-generator/manage/admin.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/whats-new-popup-generator/whats-new-popup.php:34

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following browser errors
    • > GET request to /wp-admin/options-general.php?page=Pop_up_Generator
    • > Security (warning) in unknown
    security - Error with Permissions-Policy header: Unrecognized feature: 'ambient-light-sensor'.
    • > GET request to /wp-admin/options-general.php?page=Pop_up_Generator
    • > Security (warning) in unknown
    security - Error with Permissions-Policy header: Unrecognized feature: 'bluetooth'.

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Screenshots: Please add images for these screenshots: #1 (Options Page1), #2 (Options Page2), #3 (Popup scene)
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === whats-new-popup-generator === )
  • Requires at least: Invalid plugin version format
You can look at the official readme.txt

whats-new-popup-generator/whats-new-popup.php 85% from 13 tests

"What's New Popup Generator" version 1.0.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("whats-new-popup-generator.php" instead of "whats-new-popup.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 220 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
No dangerous file extensions were detected463 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP213490357
CSS161101
JavaScript1215

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity25.00
▷ Minimum class complexity25.00
▷ Maximum class complexity25.00
Average method complexity2.85
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
2 PNG files occupy 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png27.84KB12.63KB▼ 54.65%
screenshot-1.png34.57KB15.67KB▼ 54.67%