72% easy-popup-announcement

Code Review | Easy Popup Announcement

WordPress plugin Easy Popup Announcement scored72%from 54 tests.

About plugin

  • Plugin page: easy-popup-announ...
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-5.6
  • WordPress version: 6.3.1
  • First release: Sep 5, 2014
  • Latest release: Dec 9, 2020
  • Number of updates: 44
  • Update frequency: every 52.0 days
  • Top authors: pupungbp (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /6,441 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 gracefully, with no errors

Server metrics [RAM: ▲0.09MB] [CPU: ▼11.08ms] Passed 4 tests

Server-side resources used by Easy Popup Announcement
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1036.22 ▼5.96
Dashboard /wp-admin3.38 ▲0.0444.09 ▼23.73
Posts /wp-admin/edit.php3.50 ▲0.1451.10 ▲6.09
Add New Post /wp-admin/post-new.php6.04 ▲0.1680.54 ▼15.45
Media Library /wp-admin/upload.php3.31 ▲0.0835.94 ▲0.82
All Popups /wp-admin/edit.php?post_type=epapopup3.3537.13
Add New /wp-admin/post-new.php?post_type=epapopup6.0378.50
Options /wp-admin/edit.php?post_type=epapopup&page=epaoptions3.2533.45

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Easy Popup Announcement
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,931 ▲17013.94 ▼0.418.29 ▲6.5737.47 ▼7.51
Dashboard /wp-admin2,250 ▲705.81 ▲0.1498.79 ▲1.4841.65 ▼2.63
Posts /wp-admin/edit.php2,157 ▲542.48 ▲0.4540.76 ▲3.9934.39 ▼1.73
Add New Post /wp-admin/post-new.php1,568 ▲4223.22 ▲0.06697.10 ▲9.8437.60 ▼15.38
Media Library /wp-admin/upload.php1,455 ▲524.49 ▲0.2796.51 ▼6.6639.58 ▼11.81
All Popups /wp-admin/edit.php?post_type=epapopup1,1272.2336.5430.49
Add New /wp-admin/post-new.php?post_type=epapopup6,18319.18882.1635.92
Options /wp-admin/edit.php?post_type=epapopup&page=epaoptions1,1512.5751.8930.77

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/edit.php?post_type=epapopup&page=epaoptions
    • > Notice in wp-content/plugins/easy-popup-announcement/inc/options.php+31
    Undefined index: settings-updated

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 fix the following items
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-popup-announcement/easy-popup-announcement.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/easy-popup-announcement/inc/shortcode.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-popup-announcement/inc/options.php:13

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)
These are user-side errors you should fix
    • > GET request to /wp-admin/edit.php?post_type=epapopup&page=epaoptions
    • > Console-api (warning) in wp-admin/js/common.min.js?ver=6.3.1+1:283
    wpColorPickerL10n.defaultLabel is deprecated since version 5.5.0! Use wp.i18n instead.
    • > GET request to /wp-admin/edit.php?post_type=epapopup&page=epaoptions
    • > Console-api (warning) in wp-admin/js/common.min.js?ver=6.3.1+1:283
    wpColorPickerL10n.pick is deprecated since version 5.5.0! Use wp.i18n instead.
    • > GET request to /wp-admin/edit.php?post_type=epapopup&page=epaoptions
    • > Console-api (warning) in wp-admin/js/common.min.js?ver=6.3.1+1:283
    wpColorPickerL10n.defaultString is deprecated since version 5.5.0! Use wp.i18n instead.
    • > GET request to /wp-admin/edit.php?post_type=epapopup&page=epaoptions
    • > Console-api (warning) in wp-admin/js/common.min.js?ver=6.3.1+1:283
    wpColorPickerL10n.defaultAriaLabel is deprecated since version 5.5.0! Use wp.i18n instead.

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% 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:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === easy-popup-announcement === )
Please take inspiration from this readme.txt

easy-popup-announcement/easy-popup-announcement.php 92% from 13 tests

The principal PHP file in "Easy Popup Announcement" v. 1.0.5 is loaded by WordPress automatically on each request
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 150 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin454 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP34655267
PO File1262675
JavaScript411064
CSS20148

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.13
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%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/close-button.png1.80KB0.68KB▼ 62.41%