72% dc-popup-custom

Code Review | DC Popup Custom

WordPress plugin DC Popup Custom scored 72% from 54 tests.

About plugin

  • Plugin page: dc-popup-custom
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.4
  • WordPress version: 6.3.1
  • First release: Jan 7, 2016
  • Latest release: Nov 24, 2017
  • Number of updates: 15
  • Update frequency: every 47.4 days
  • Top authors: dattardwp-21 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 771 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▼0.59MB] [CPU: ▼17.10ms] Passed 4 tests

An overview of server-side resources used by DC Popup Custom
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1147.38 ▲5.59
Dashboard /wp-admin3.41 ▲0.1046.19 ▼5.41
Posts /wp-admin/edit.php3.46 ▲0.1051.64 ▲1.26
Add New Post /wp-admin/post-new.php3.24 ▼2.6538.72 ▼61.19
Media Library /wp-admin/upload.php3.33 ▲0.1036.41 ▼3.07
Popups /wp-admin/edit.php?post_type=popup3.3737.26
Add New /wp-admin/post-new.php?post_type=popup3.1934.33

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for DC Popup Custom
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,927 ▲19213.58 ▼0.834.96 ▲3.2338.40 ▼4.41
Dashboard /wp-admin2,243 ▲555.05 ▼0.84107.84 ▲2.1741.18 ▲1.46
Posts /wp-admin/edit.php2,126 ▲372.00 ▼0.1041.99 ▲3.3035.15 ▲0.49
Add New Post /wp-admin/post-new.php1,547 ▲1423.56 ▲0.16630.61 ▼42.8655.13 ▼6.69
Media Library /wp-admin/upload.php1,422 ▲344.23 ▲0.05101.86 ▼4.9942.50 ▼4.81
Popups /wp-admin/edit.php?post_type=popup1,0961.9830.6626.80
Add New /wp-admin/post-new.php?post_type=popup1,6402.5449.7960.67

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
    • > GET request to /wp-admin/post-new.php?post_type=popup
    • > Notice in wp-content/plugins/dc-popup-custom/popups-cpt.php+150
    Undefined index: wp_custom_popup_cpt_nonce

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
  • 5× 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/dc-popup-custom/footer.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dc-popup-custom/settings.php:2
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/dc-popup-custom/wp-custom-popup.php on line 18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dc-popup-custom/popups-cpt.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dc-popup-custom/popups-cpt.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There are user-side issues you should fix
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=popup
    • > Network (severe)
    wp-content/plugins/wp-custom-popup/css/style.css?ver=1 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=popup
    • > Network (severe)
    wp-content/plugins/wp-custom-popup/css/mce.css?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=popup
    • > Network (severe)
    wp-content/plugins/wp-custom-popup/js/jquery.colorbox-min.js?ver=1 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
5 plugin tags: custom, conversion, html, popup, wordpress

dc-popup-custom/wp-custom-popup.php 92% from 13 tests

The main file in "DC Popup Custom" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("dc-popup-custom.php" instead of "wp-custom-popup.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected680 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP52527453
CSS200215
JavaScript20612

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.43
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%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
4 compressed PNG files occupy 0.00MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/border.png0.16KB0.16KB0.00%
images/controls.png1.99KB2.04KB0.00%
images/loading-background.png0.16KB0.15KB▼ 6.02%
images/popup_close.png2.01KB1.29KB▼ 35.97%