10% double-click

Code Review | Double Click

WordPress plugin Double Click scored10%from 54 tests.

About plugin

  • Plugin page: double-click
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.2.2
  • WordPress version: 6.3.1
  • First release: Jul 13, 2015
  • Latest release: Jul 22, 2015
  • Number of updates: 9
  • Update frequency: every 1.7 days
  • Top authors: controleonline (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /789 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/double-click/src/DoubleClick/WPDoubleClick.php+39
    Function create_function() is deprecated

Server metrics [RAM: ▼1.84MB] [CPU: ▼51.80ms] Passed 4 tests

Analyzing server-side resources used by Double Click
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.13 ▼1.338.73 ▼37.03
Dashboard /wp-admin2.17 ▼1.1311.26 ▼41.98
Posts /wp-admin/edit.php2.17 ▼1.188.99 ▼43.00
Add New Post /wp-admin/post-new.php2.17 ▼3.7110.74 ▼85.19
Media Library /wp-admin/upload.php2.17 ▼1.0510.38 ▼23.43
Double Click /wp-admin/options-general.php?page=DoubleClick2.179.98

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 2,688 new files
Database: 4 new tables, 7 new options
New tables
wp_dfp_slots
wp_dfp_ad_block
wp_dfp_slots_taxonomy
wp_dfp_sizes
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_double-click
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Double Click
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,832 ▲8615.82 ▲1.3815.63 ▲12.9043.02 ▼1.92
Dashboard /wp-admin2,214 ▲234.85 ▼0.10114.52 ▲4.1444.26 ▲3.47
Posts /wp-admin/edit.php2,097 ▲112.02 ▼0.0336.12 ▼1.9234.66 ▲0.74
Add New Post /wp-admin/post-new.php1,521 ▲223.11 ▼0.02673.30 ▼18.6854.81 ▼3.75
Media Library /wp-admin/upload.php1,399 ▲114.22 ▲0.02106.31 ▼0.2148.06 ▲3.31
Double Click /wp-admin/options-general.php?page=DoubleClick8022.0327.7729.98

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script 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 DoubleClickAdmin handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • Zombie tables detected upon uninstall: 4 tables
    • wp_dfp_sizes
    • wp_dfp_slots_taxonomy
    • wp_dfp_slots
    • wp_dfp_ad_block
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_double-click
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=DoubleClick
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script 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 DoubleClickAdmin 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=DoubleClick
    • > 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 DoubleClick handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=DoubleClick
    • > Deprecated in wp-content/plugins/double-click/src/DoubleClick/WPDoubleClick.php+39
    Function create_function() is deprecated

SRP 0% 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 take a closer look at the following
  • 3× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/double-click/vendor/bin/classmap_generator.php
    • > /wp-content/plugins/double-click/vendor/bin/pluginmap_generator.php
    • > /wp-content/plugins/double-click/vendor/bin/templatemap_generator.php
  • 1684× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Zend\\Validator\\ValidatorInterface' not found in wp-content/plugins/double-click/vendor/zendframework/zendframework/library/Zend/Captcha/AdapterInterface.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Zend\\Code\\Generator\\DocBlock\\Tag\\AbstractTypeableTag' not found in wp-content/plugins/double-click/vendor/zendframework/zendframework/library/Zend/Code/Generator/DocBlock/Tag/ParamTag.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'Zend\\Http\\Client\\Exception\\ExceptionInterface' not found in wp-content/plugins/double-click/vendor/zendframework/zendframework/library/Zend/Http/Client/Adapter/Exception/ExceptionInterface.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Zend\\XmlRpc\\Value\\AbstractScalar' not found in wp-content/plugins/double-click/vendor/zendframework/zendframework/library/Zend/XmlRpc/Value/Base64.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'Zend\\Server\\Exception\\ExceptionInterface' not found in wp-content/plugins/double-click/vendor/zendframework/zendframework/library/Zend/Server/Exception/InvalidArgumentException.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Zend\\EventManager\\Event' not found in wp-content/plugins/double-click/vendor/zendframework/zendframework/library/Zend/Cache/Storage/Event.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Zend\\Db\\Adapter\\Exception\\RuntimeException' not found in wp-content/plugins/double-click/vendor/zendframework/zendframework/library/Zend/Db/Adapter/Exception/InvalidConnectionParametersException.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'Zend\\Code\\Exception\\ExceptionInterface' not found in wp-content/plugins/double-click/vendor/zendframework/zendframework/library/Zend/Code/Exception/InvalidArgumentException.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'Zend\\Db\\Adapter\\AdapterInterface' not found in wp-content/plugins/double-click/vendor/zendframework/zendframework/library/Zend/Db/Adapter/Adapter.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Zend\\Session\\AbstractContainer' not found in wp-content/plugins/double-click/vendor/zendframework/zendframework/library/Zend/Session/Container.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: dfp, double click, doubleclick

double-click/double-click-plugin.php 92% from 13 tests

The primary PHP file in "Double Click" version 1.1.1 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("double-click.php" instead of "double-click-plugin.php")

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
Success! There were no dangerous files found in this plugin171,292 lines of code in 2,628 files:
LanguageFilesBlank linesComment linesLines of code
PHP2,50635,676115,899164,470
Markdown5854404,439
JSON55402,086
JavaScript310198
Bourne Shell2201150
XML15022
YAML23015
CSS10012

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity10.34
▷ Minimum class complexity1.00
▷ Maximum class complexity202.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity81.00
Code structure
Namespaces395
Interfaces341
Traits16
Classes1,827
▷ Abstract classes1417.72%
▷ Concrete classes1,68692.28%
▷ Final classes191.13%
Methods12,400
▷ Static methods6385.15%
▷ Public methods10,65185.90%
▷ Protected methods1,67213.48%
▷ Private methods770.62%
Functions178
▷ Named functions42.25%
▷ Anonymous functions17497.75%
Constants1,274
▷ Global constants40.31%
▷ Class constants1,27099.69%
▷ Public constants1,270100.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
1 PNG file occupies 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
vendor/zendframework/zendframework/resources/ZendFramework-logo.png36.66KB16.86KB▼ 54.00%