84% debug-bar-elasticpress

Code Review | ElasticPress Debugging Add-On

WordPress plugin ElasticPress Debugging Add-On scored84%from 54 tests.

About plugin

  • Plugin page: debug-bar-elastic...
  • Plugin version: 3.1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.3
  • WordPress version: 6.3.1
  • First release: Jan 20, 2016
  • Latest release: Sep 20, 2023
  • Number of updates: 18
  • Update frequency: every 155.9 days
  • Top authors: tlovett1 (66.67%)10up (27.78%)10upbot (16.67%)

Code review

54 tests

User reviews

2 reviews

Install metrics

700+ active /2,645,195 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.52ms] Passed 4 tests

An overview of server-side resources used by ElasticPress Debugging Add-On
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0445.73 ▲4.19
Dashboard /wp-admin3.34 ▲0.0346.93 ▲1.90
Posts /wp-admin/edit.php3.39 ▲0.0347.51 ▼4.41
Add New Post /wp-admin/post-new.php5.92 ▲0.0391.24 ▼12.19
Media Library /wp-admin/upload.php3.26 ▲0.0334.88 ▲0.62

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for ElasticPress Debugging Add-On
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲7113.19 ▼1.202.02 ▲0.2243.21 ▼7.16
Dashboard /wp-admin2,212 ▲214.84 ▼1.06109.56 ▲2.7441.68 ▼0.72
Posts /wp-admin/edit.php2,095 ▲62.13 ▲0.1138.81 ▼2.3936.19 ▲1.40
Add New Post /wp-admin/post-new.php1,539 ▼023.14 ▲0.06591.15 ▲8.3558.99 ▲1.01
Media Library /wp-admin/upload.php1,388 ▲64.19 ▼0.0197.71 ▼8.7741.03 ▼6.95

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

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 fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function DebugBarElasticPress\\plugin_dir_url() in wp-content/plugins/debug-bar-elasticpress/debug-bar-elasticpress.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: elasticpress, debug, elasticsearch, debug bar

debug-bar-elasticpress/debug-bar-elasticpress.php 92% from 13 tests

Analyzing the main PHP file in "ElasticPress Debugging Add-On" version 3.1.0
Please take the time to fix the following:
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.6" instead of "5.6")

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
Everything looks great! No dangerous files found in this plugin1,133 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP8206492932
CSS1217125
JavaScript1121076

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity16.00
▷ Minimum class complexity1.00
▷ Maximum class complexity56.00
Average method complexity3.05
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods46
▷ Static methods12.17%
▷ Public methods3780.43%
▷ Protected methods919.57%
▷ Private methods00.00%
Functions12
▷ Named functions866.67%
▷ Anonymous functions433.33%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected