84% media-item-url

Code Review | Media Item URL

WordPress plugin Media Item URL scored84%from 54 tests.

About plugin

  • Plugin page: media-item-url
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.6.0
  • WordPress version: 6.3.1
  • First release: Feb 14, 2014
  • Latest release: Aug 16, 2016
  • Number of updates: 7
  • Update frequency: every 130.7 days
  • Top authors: norcross (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

200+ active /3,275 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

Analyzing server-side resources used by Media Item URL
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0245.03 ▲3.98
Dashboard /wp-admin3.33 ▲0.0353.42 ▼7.72
Posts /wp-admin/edit.php3.38 ▲0.0251.56 ▲2.50
Add New Post /wp-admin/post-new.php5.92 ▲0.0284.11 ▼27.04
Media Library /wp-admin/upload.php3.26 ▲0.0236.46 ▼0.84

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Media Item URL
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.68 ▲0.331.62 ▼0.2145.42 ▲0.29
Dashboard /wp-admin2,195 ▲185.64 ▲0.0195.52 ▲7.1443.08 ▲4.01
Posts /wp-admin/edit.php2,100 ▼01.95 ▼0.2033.56 ▼0.4832.93 ▼5.57
Add New Post /wp-admin/post-new.php1,537 ▲1118.03 ▼5.09646.55 ▼32.8065.81 ▲8.78
Media Library /wp-admin/upload.php1,398 ▼24.25 ▲0.1097.52 ▼6.7046.26 ▲0.26

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

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)
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
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/media-item-url/media-item-url.php:17

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
2 plugin tags: media gallery, images

media-item-url/media-item-url.php 85% from 13 tests

This is the main PHP file of "Media Item URL" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Domain Path: The domain path must begin with a forward slash character ("/languages")
  • Domain Path: Use only dashes and lowercase characters for the domain path ("languages")

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
Success! There were no dangerous files found in this plugin158 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP14085107
PO File17730
JavaScript2132621

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.69
Average class complexity33.00
▷ Minimum class complexity33.00
▷ Maximum class complexity33.00
Average method complexity5.57
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods228.57%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
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
There are no PNG files in this plugin