84% easy-nag-popup

Code Review | Easy Nag Popup

WordPress plugin Easy Nag Popup scored84%from 54 tests.

About plugin

  • Plugin page: easy-nag-popup
  • Plugin version: 2.1.7.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-3.7.1
  • WordPress version: 6.3.1
  • First release: Dec 1, 2012
  • Latest release: Nov 19, 2013
  • Number of updates: 21
  • Update frequency: every 16.9 days
  • Top authors: matstars (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active /5,234 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼7.41ms] Passed 4 tests

A check of server-side resources used by Easy Nag Popup
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0336.57 ▲0.21
Dashboard /wp-admin3.33 ▼0.0244.34 ▼13.41
Posts /wp-admin/edit.php3.38 ▲0.0246.46 ▲0.05
Add New Post /wp-admin/post-new.php5.91 ▲0.0391.28 ▼13.52
Media Library /wp-admin/upload.php3.25 ▲0.0232.83 ▼2.77
Add New /wp-admin/post-new.php?post_type=easy_nag_popup3.3343.52
All Nag Popups /wp-admin/edit.php?post_type=easy_nag_popup3.2936.25

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Easy Nag Popup: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲8313.17 ▼1.261.77 ▲0.0844.36 ▲2.71
Dashboard /wp-admin2,232 ▲445.87 ▲0.95100.18 ▼1.4372.58 ▲32.54
Posts /wp-admin/edit.php2,115 ▲232.01 ▼0.0338.08 ▼1.6633.48 ▼2.22
Add New Post /wp-admin/post-new.php1,549 ▲723.15 ▲4.90745.61 ▲77.8759.19 ▲1.72
Media Library /wp-admin/upload.php1,414 ▲324.19 ▼0.05113.50 ▲7.2472.68 ▲26.62
Add New /wp-admin/post-new.php?post_type=easy_nag_popup1,7503.7060.1780.42
All Nag Popups /wp-admin/edit.php?post_type=easy_nag_popup1,0791.9432.5628.27

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

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 have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-nag-popup/inc/class-easy-nag-popup-admin.php:60

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Screenshots: These screenshots do not have images: #1 (Add New Nag Popup Screen), #2 (Example of a Nag Popup)
You can look at the official readme.txt

easy-nag-popup/easy-nag-popup.php Passed 13 tests

This is the main PHP file of "Easy Nag Popup" version 2.1.7.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
73 characters long description:
Provides you with a rich and easy way to add a nag popup to your website.

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 plugin875 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP4212645762
JavaScript21359
CSS13027
LESS13027

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.72
Average class complexity47.67
▷ Minimum class complexity16.00
▷ Maximum class complexity107.00
Average method complexity4.41
▷ Minimum method complexity1.00
▷ Maximum method complexity63.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods41
▷ Static methods1946.34%
▷ Public methods3995.12%
▷ Protected methods00.00%
▷ Private methods24.88%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants00.00%
▷ Class constants9100.00%
▷ Public constants9100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 1.09MB with 0.63MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/easy-nag-popup.png1.63KB0.80KB▼ 50.96%
screenshot-2.png939.71KB431.98KB▼ 54.03%
screenshot-1.png174.36KB52.80KB▼ 69.72%