10% royal-popup-notice

Code Review | Royal PopUp Notice

WordPress plugin Royal PopUp Notice scored 10% from 54 tests.

About plugin

  • Plugin page: royal-popup-notice
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.2
  • WordPress version: 5.8.1
  • First release: Sep 6, 2014
  • Latest release: Jun 2, 2016
  • Number of updates: 4
  • Update frequency: every 158.8 days
  • Top authors: royaltechbd (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 757 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/royal-popup-notice/royal-popup-notice.php+101
    Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`

Server metrics [RAM: ▼1.81MB] [CPU: ▼186.94ms] Passed 4 tests

Server-side resources used by Royal PopUp Notice
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /1.82 ▼0.905.25 ▼21.99
Dashboard /wp-admin1.83 ▼1.225.86 ▼26.94
Posts /wp-admin/edit.php1.84 ▼1.275.13 ▼40.35
Add New Post /wp-admin/post-new.php1.83 ▼3.605.37 ▼649.81
Media Library /wp-admin/upload.php1.83 ▼1.175.10 ▼30.64
Royal PopUp Notice /wp-admin/options-general.php?page=royal_popup_notice1.845.02

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 1 new option
New WordPress options
royal_popup_notice_plugin_options

Browser metrics Passed 4 tests

A check of browser resources used by Royal PopUp Notice
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,735 ▲13916.23 ▲0.2011.11 ▲1.2246.60 ▼0.03
Dashboard /wp-admin2,978 ▲445.93 ▼0.06138.83 ▲5.94110.77 ▲2.18
Posts /wp-admin/edit.php2,744 ▲52.71 ▼0.0172.66 ▼2.1587.95 ▲0.22
Add New Post /wp-admin/post-new.php1,673 ▲17319.09 ▲0.32373.10 ▼7.94107.04 ▼5.02
Media Library /wp-admin/upload.php1,812 ▲55.03 ▲0.02160.44 ▲9.47119.83 ▼4.85
Royal PopUp Notice /wp-admin/options-general.php?page=royal_popup_notice1,4302.3768.5783.52

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
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/royal-popup-notice/royal-popup-notice.php+101
    Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`

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=royal_popup_notice
    • > Deprecated in wp-content/plugins/royal-popup-notice/royal-popup-notice.php+101
    Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`
    • > GET request to /wp-admin/options-general.php?page=royal_popup_notice
    • > User deprecated in wp-includes/functions.php+5221
    screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=royal_popup_notice
    • > User deprecated in wp-includes/functions.php+5221
    get_screen_icon is deprecated since version 3.8.0 with no alternative available.
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=royal_popup_notice
    • > Notice in wp-content/plugins/royal-popup-notice/royal-popup-notice.php+200
    Trying to access array offset on value of type bool

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 trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/royal-popup-notice/royal-popup-notice.php:13

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
    • > GET request to /wp-admin/options-general.php?page=royal_popup_notice
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,farbtastic&ver=5.8.1 1:31592 "jQuery.Deferred exception: Cannot read properties of undefined (reading 'value')" "TypeError: Cannot read properties of undefined (reading 'value')\n at $._farbtastic.fb.linkTo (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,farbtastic&ver=5.8.1:73:29)\n at new $._farbtastic (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,farbtastic&ver=5.8.1:280:8)\n at Function.$.farbtastic (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,farbtastic&ver=5.8.1:24:58)\n at s.fn.init.$.fn.farbtastic (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,farbtastic&ver=5.8.1:18:5)\n at HTMLDocument.\u003Canonymous> (/wp-admin/options-general.php?page=royal_popup_notice:167:28)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,farbtastic&ver=5.8.1:2:30038)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,farbtastic&ver=5.8.1:2:30340)" undefined
    • > GET request to /wp-admin/options-general.php?page=royal_popup_notice
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,farbtastic&ver=5.8.1 72:28 Uncaught TypeError: Cannot read properties of undefined (reading 'value')

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Add a description for screenshot #2 in royal-popup-notice/assets to your readme.txt
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === royal-popup-notice === )
You can look at the official readme.txt

royal-popup-notice/royal-popup-notice.php Passed 13 tests

Analyzing the main PHP file in "Royal PopUp Notice" version 1.0.1
121 characters long description:
Display a PopUp Notice that you can easily link to any page like feedback, twitter, facebook etc & customise as you like.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin287 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP212947287

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.09
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%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected