84% convert-media-to-edd

Code Review | Convert Media to EDD

WordPress plugin Convert Media to EDD scored 84% from 54 tests.

About plugin

  • Plugin page: convert-media-to-edd
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Feb 28, 2017
  • Latest release: Feb 28, 2017
  • Number of updates: 8
  • Update frequency: every 21.1 days
  • Top authors: wooninjas (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 601 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 gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.28ms] Passed 4 tests

A check of server-side resources used by Convert Media to EDD
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0236.58 ▼4.89
Dashboard /wp-admin3.33 ▲0.0246.88 ▼2.17
Posts /wp-admin/edit.php3.38 ▲0.0248.82 ▼0.14
Add New Post /wp-admin/post-new.php5.91 ▲0.0289.67 ▼1.90
Media Library /wp-admin/upload.php3.25 ▲0.0235.68 ▲0.92

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Convert Media to EDD
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲7513.20 ▼1.171.72 ▼0.3539.46 ▼9.37
Dashboard /wp-admin2,216 ▲254.90 ▼0.97108.52 ▼13.1843.61 ▲1.65
Posts /wp-admin/edit.php2,098 ▲62.04 ▲0.0441.92 ▲1.1538.30 ▲1.82
Add New Post /wp-admin/post-new.php1,524 ▲1017.74 ▲0.13685.30 ▼12.2251.48 ▼3.93
Media Library /wp-admin/upload.php1,398 ▲104.19 ▼0.0096.11 ▼5.1145.20 ▲2.02

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 did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_editor() in wp-content/plugins/convert-media-to-edd/includes/admin/options.php:40

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Contributors: Plugin contributors not specified
You can take inspiration from this readme.txt

convert-media-to-edd/convert-media-to-edd.php 92% from 13 tests

The main PHP script in "Convert Media to EDD" version 1.0.0 is automatically included on every request by WordPress
The following require your attention:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin1,216 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript212422594
PHP8158215539
CSS110083

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity10.20
▷ Minimum class complexity1.00
▷ Maximum class complexity28.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes120.00%
Methods37
▷ Static methods3081.08%
▷ Public methods3183.78%
▷ Protected methods25.41%
▷ Private methods410.81%
Functions7
▷ Named functions685.71%
▷ Anonymous functions114.29%
Constants7
▷ Global constants571.43%
▷ Class constants228.57%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/switch.png0.53KB0.64KB0.00%