78% onclick-popup

Code Review | Onclick Popup

WordPress plugin Onclick Popup scored78%from 54 tests.

About plugin

  • Plugin page: onclick-popup
  • Plugin version: 7.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.4
  • WordPress version: 6.3.1
  • First release: Nov 15, 2011
  • Latest release: Oct 29, 2023
  • Number of updates: 44
  • Update frequency: every 99.3 days
  • Top authors: gopi_plus (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

200+ active /53,183 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.06MB] [CPU: ▼6.72ms] Passed 4 tests

Server-side resources used by Onclick Popup
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0643.08 ▲3.69
Dashboard /wp-admin3.37 ▲0.0345.93 ▼15.19
Posts /wp-admin/edit.php3.42 ▲0.0747.43 ▲0.80
Add New Post /wp-admin/post-new.php5.95 ▲0.0782.15 ▼16.16
Media Library /wp-admin/upload.php3.30 ▲0.0737.87 ▲5.47
Popup Setting /wp-admin/admin.php?page=onclick-popup3.3333.37
Content Management /wp-admin/admin.php?page=onclick-popup-content3.2835.13

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 15 new files
Database: 1 new table, 22 new options
New tables
wp_onclick_popup_plugin
New WordPress options
onclickpopup_setting1
onclickpopup_setting2_left
theysaidso_admin_options
onclickpopup_setting1_left
onclickpopup_setting5_left
onclickpopup_setting2
onclickpopup_setting1_top
onclickpopup_setting4
onclickpopup_setting3
onclickpopup_setting3_left
...

Browser metrics Passed 4 tests

An overview of browser requirements for Onclick Popup
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲5914.26 ▼0.091.81 ▲0.1041.79 ▼2.29
Dashboard /wp-admin2,225 ▲485.62 ▲0.0982.78 ▼17.1737.04 ▼11.15
Posts /wp-admin/edit.php2,124 ▲241.98 ▼0.0533.50 ▼2.4533.93 ▼2.70
Add New Post /wp-admin/post-new.php1,548 ▲1923.04 ▲0.05679.97 ▲20.2055.10 ▼3.47
Media Library /wp-admin/upload.php1,424 ▲274.20 ▲0.05107.04 ▲3.7046.03 ▲1.15
Popup Setting /wp-admin/admin.php?page=onclick-popup1,0252.0327.9327.60
Content Management /wp-admin/admin.php?page=onclick-popup-content1,0332.1524.6625.12

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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
Please take a closer look at the following
  • 4× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/onclick-popup/pages/content-management-edit.php
    • > /wp-content/plugins/onclick-popup/pages/content-setting.php
    • > /wp-content/plugins/onclick-popup/pages/content-management-add.php
    • > /wp-content/plugins/onclick-popup/pages/content-management-show.php
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/onclick-popup/onclick-popup.php:22
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/onclick-popup/onclick-popup.php on line 18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

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
4 plugin tags: widget, popup, onclick, plugin

onclick-popup/onclick-popup.php 92% from 13 tests

The main PHP script in "Onclick Popup" version 7.2 is automatically included on every request by WordPress
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 264 characters long)

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
Good job! No executable or dangerous file extensions detected1,268 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP610437869
PO File2132200299
JavaScript2152383
CSS13017

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.19
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%
Constants6
▷ Global constants6100.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
No PNG images were found in this plugin