84% debug-media

Code Review | Debug Media

WordPress plugin Debug Media scored84%from 54 tests.

About plugin

  • Plugin page: debug-media
  • Plugin version: 0.3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-4.7.0
  • WordPress version: 6.3.1
  • First release: May 28, 2016
  • Latest release: Dec 8, 2016
  • Number of updates: 12
  • Update frequency: every 16.5 days
  • Top authors: joemcgill (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /3,425 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.01MB] [CPU: ▼5.10ms] Passed 4 tests

This is a short check of server-side resources used by Debug Media
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0043.68 ▲2.33
Dashboard /wp-admin3.31 ▼0.0451.27 ▼9.47
Posts /wp-admin/edit.php3.36 ▲0.0050.87 ▼0.24
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.01 ▼11.47
Media Library /wp-admin/upload.php3.23 ▲0.0039.54 ▲0.80

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Debug Media
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.72 ▲0.461.78 ▼0.0947.06 ▲3.15
Dashboard /wp-admin2,192 ▲155.58 ▼0.0889.05 ▼6.6240.38 ▼4.63
Posts /wp-admin/edit.php2,103 ▼01.97 ▼0.0139.49 ▲3.1433.87 ▼0.60
Add New Post /wp-admin/post-new.php1,526 ▼123.29 ▲0.19666.49 ▲52.9349.81 ▼4.90
Media Library /wp-admin/upload.php1,400 ▼34.28 ▲0.1296.23 ▼3.3942.02 ▼1.59

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      require_once(/tmp/wordpress-tests-lib/includes/functions.php): failed to open stream: No such file or directory in wp-content/plugins/debug-media/tests/bootstrap.php on line 14
    • > PHP Fatal error
      require_once(): Failed opening required '/tmp/wordpress-tests-lib/includes/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/debug-media/tests/bootstrap.php on line 14
    • > PHP Fatal error
      Uncaught Error: Class 'Debug_Bar_Panel' not found in wp-content/plugins/debug-media/class-debug-bar-media.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/debug-media/tests/test-sample.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/debug-media/wp-debug-media.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
2 plugin tags: media, debugging

debug-media/wp-debug-media.php 92% from 13 tests

Analyzing the main PHP file in "Debug Media" version 0.3.0
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("debug-media.php" instead of "wp-debug-media.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin353 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP432126152
Bourne Shell119693
JavaScript18144
YAML17022
Markdown18017
XML10014
JSON11011

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity11.50
▷ Minimum class complexity1.00
▷ Maximum class complexity22.00
Average method complexity3.62
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods337.50%
▷ Protected methods00.00%
▷ Private methods562.50%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG images were found in this plugin