62% emc2-popup-disclaimer

Code Review | EMC2 Popup Disclaimer

WordPress plugin EMC2 Popup Disclaimer scored62%from 54 tests.

About plugin

  • Plugin page: emc2-popup-discla...
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-3.3.2
  • WordPress version: 6.3.1
  • First release: May 17, 2012
  • Latest release: May 26, 2012
  • Number of updates: 35
  • Update frequency: every 1.6 days
  • Top authors: emcniece (100%)

Code review

54 tests

User reviews

18 reviews

Install metrics

100+ active /9,389 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼1.91MB] [CPU: ▼53.19ms] Passed 4 tests

Analyzing server-side resources used by EMC2 Popup Disclaimer
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.385.41 ▼41.30
Dashboard /wp-admin2.10 ▼1.206.07 ▼44.11
Posts /wp-admin/edit.php2.10 ▼1.268.14 ▼41.88
Add New Post /wp-admin/post-new.php2.10 ▼3.796.64 ▼85.46
Media Library /wp-admin/upload.php2.10 ▼1.135.55 ▼28.65
EMC2 Popup Disclaimer /wp-admin/options-general.php?page=emc2-popup-disclaimer/emc2pdc-admin.php2.106.05

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 66 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_recent-comments
can_compress_scripts
db_upgraded
emc2pdc_settings
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by EMC2 Popup Disclaimer
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,954 ▲20814.07 ▼0.3314.59 ▲12.7742.50 ▲0.90
Dashboard /wp-admin2,211 ▲265.84 ▼0.06102.87 ▲1.9441.69 ▼3.13
Posts /wp-admin/edit.php2,109 ▲202.13 ▲0.1636.96 ▼1.0935.70 ▲5.10
Add New Post /wp-admin/post-new.php1,528 ▼523.13 ▲0.01638.83 ▼42.7565.31 ▲13.40
Media Library /wp-admin/upload.php1,401 ▲134.29 ▲0.0698.63 ▼8.0143.97 ▼3.18
EMC2 Popup Disclaimer /wp-admin/options-general.php?page=emc2-popup-disclaimer/emc2pdc-admin.php9482.5628.4843.51

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the emc2pdc_css handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=emc2-popup-disclaimer/emc2pdc-admin.php
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the emc2pdc_css handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=emc2-popup-disclaimer/emc2pdc-admin.php
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=emc2-popup-disclaimer/emc2pdc-admin.php
    • > Notice in wp-content/plugins/emc2-popup-disclaimer/emc2pdc-admin.php+96
    Undefined index: emc2_hidden

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/emc2-popup-disclaimer/emc2pdc-admin.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/emc2-popup-disclaimer/emc2pdc-admin.php:9

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following user-side errors
    • > GET request to /wp-admin/options-general.php?page=emc2-popup-disclaimer/emc2pdc-admin.php
    • > Other (severe) in unknown
    chrome-error://chromewebdata/ - Refused to display 'https://wordpress.org/' in a frame because it set 'X-Frame-Options' to 'sameorigin'.

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Dashboard view with settings.), #2 (Initial page view with popup display.)
The official readme.txt might help

emc2-popup-disclaimer/emc2-popup-disclaimer.php Passed 13 tests

The main PHP file in "EMC2 Popup Disclaimer" ver. 1.2.1 adds more information about the plugin and also serves as the entry point for this plugin
33 characters long description:
Adds a popup Disclaimer for users

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
There were no executable files found in this plugin1,842 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript73071551,081
CSS46920422
PHP26547141
HTML1350130
XML40068

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
21 compressed PNG files occupy 0.14MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
fancybox/fancybox/fancybox-x.png0.20KB0.31KB0.00%
fancybox/fancybox/fancybox-y.png0.17KB0.24KB0.00%
fancybox/fancybox/fancy_shadow_sw.png0.33KB0.48KB0.00%
screenshot-2.png55.74KB26.65KB▼ 52.19%
fancybox/fancybox/fancy_nav_left.png1.41KB1.64KB0.00%