84% media-helpers

Code Review | media helpers

WordPress plugin media helpers scored84%from 54 tests.

About plugin

  • Plugin page: media-helpers
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.6
  • WordPress version: 6.3.1
  • First release: May 26, 2013
  • Latest release: Aug 30, 2013
  • Number of updates: 7
  • Update frequency: every 14.1 days
  • Top authors: Fab1en (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active /1,835 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
Installer ran successfully

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

This is a short check of server-side resources used by media helpers
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.16 ▼4.02
Dashboard /wp-admin3.32 ▲0.0244.82 ▼9.16
Posts /wp-admin/edit.php3.37 ▲0.0246.22 ▼2.52
Add New Post /wp-admin/post-new.php5.90 ▲0.0190.18 ▲8.26
Media Library /wp-admin/upload.php3.24 ▲0.0135.53 ▲1.86

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 25 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_recent-posts
mediahelper
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for media helpers
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.26 ▼1.101.84 ▼0.0741.10 ▼4.81
Dashboard /wp-admin2,206 ▲154.88 ▼0.00108.63 ▲4.6240.91 ▼2.01
Posts /wp-admin/edit.php2,089 ▼32.01 ▲0.0139.10 ▼0.7634.22 ▲1.02
Add New Post /wp-admin/post-new.php1,528 ▼518.41 ▼4.86598.38 ▼73.2856.12 ▼4.12
Media Library /wp-admin/upload.php1,388 ▼04.23 ▲0.0798.02 ▲2.7653.96 ▲11.87

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 7 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • mediahelper
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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 items
  • 11× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/media-helpers/admin/update_media_permalink.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Walker_Nav_Menu' not found in wp-content/plugins/media-helpers/admin/inc/nav-menu-image.class.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/media-helpers/admin/image_link.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/media-helpers/admin/change_media_file.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/media-helpers/admin/duplicate_media.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/media-helpers/admin/change_parent.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/media-helpers/admin/url_media.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/media-helpers/admin/limit_image_resolution.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/media-helpers/admin/rich_desc.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/media-helpers/front/image_link.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

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
1 plugin tags: media

media-helpers/media-helpers.php 92% from 13 tests

The main file in "media helpers" v. 1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • 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 glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected1,113 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP11135142800
JavaScript45224139
PO File1303290
CSS37061
Markdown110023

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity18.00
▷ Minimum class complexity18.00
▷ Maximum class complexity18.00
Average method complexity6.67
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions36
▷ Named functions36100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/img/delete.png1.35KB1.34KB▼ 0.65%