73% custom-color-popup

Code Review | Welcome Popup

WordPress plugin Welcome Popup scored73%from 54 tests.

About plugin

  • Plugin page: custom-color-popup
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.2.2
  • WordPress version: 6.3.1
  • First release: Mar 22, 2016
  • Latest release: Mar 22, 2016
  • Number of updates: 4
  • Update frequency: every 1.0 days
  • Top authors: bikel (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,043 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼5.36ms] Passed 4 tests

This is a short check of server-side resources used by Welcome Popup
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0844.01 ▲2.08
Dashboard /wp-admin3.38 ▲0.0356.30 ▼8.98
Posts /wp-admin/edit.php3.49 ▲0.1356.76 ▲1.54
Add New Post /wp-admin/post-new.php5.95 ▲0.0785.79 ▼16.06
Media Library /wp-admin/upload.php3.27 ▲0.0540.42 ▲2.46
Custom Color Popup /wp-admin/options-general.php?page=bdtheme_popup_page3.3138.41

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts
widget_theysaidso_widget
bdtheme_popup_settings
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Welcome Popup
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,156 ▲37015.41 ▲1.0313.10 ▲11.0279.18 ▲36.60
Dashboard /wp-admin2,384 ▲1786.64 ▲0.75137.48 ▲19.1437.88 ▼5.89
Posts /wp-admin/edit.php2,288 ▲1913.57 ▲1.5651.03 ▲14.3069.73 ▲37.93
Add New Post /wp-admin/post-new.php1,702 ▲17022.81 ▼0.32633.50 ▼11.1139.99 ▼10.53
Media Library /wp-admin/upload.php1,426 ▲264.40 ▲0.1084.54 ▼13.3444.68 ▼1.84
Custom Color Popup /wp-admin/options-general.php?page=bdtheme_popup_page2,1428.00173.4857.46

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/custom-color-popup/custom_content.php+67
    Undefined variable: default_value
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

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
Please fix the following
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/custom-color-popup/custom_content.php on line 11
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/plugin.php' (include_path='.:/usr/share/php') in wp-content/plugins/custom-color-popup/custom_content.php on line 11
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/custom-color-popup/custom_content.php on line 11

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Add an image for screenshot #1 (Loader Interface:)
  • Screenshots: Please a description for screenshot #0 in custom-color-popup/assets to your readme.txt
You can look at the official readme.txt

custom-color-popup/custom_content.php 85% from 13 tests

Analyzing the main PHP file in "Welcome Popup" version 1.0.1
You should first fix the following items:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 227 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("custom-color-popup.php" instead of "custom_content.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected438 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP14930245
CSS111113
JavaScript210080

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.12
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%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
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
images/close.png4.08KB1.96KB▼ 51.95%