84% copy-media-url

Code Review | Copy Media url

WordPress plugin Copy Media url scored 84% from 54 tests.

About plugin

  • Plugin page: copy-media-url
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.5.3
  • WordPress version: 6.3.1
  • First release: Apr 17, 2015
  • Latest release: Mar 6, 2018
  • Number of updates: 13
  • Update frequency: every 81.2 days
  • Top authors: Dualcube (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

20+ active / 1,990 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 gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼5.49ms] Passed 4 tests

Analyzing server-side resources used by Copy Media url
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.51 ▼2.04
Dashboard /wp-admin3.31 ▲0.0148.90 ▲0.11
Posts /wp-admin/edit.php3.36 ▲0.0043.92 ▼1.99
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.79 ▼17.19
Media Library /wp-admin/upload.php3.23 ▲0.0036.42 ▼0.75

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Copy Media url
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.18 ▼1.191.78 ▲0.1142.26 ▲1.53
Dashboard /wp-admin2,209 ▲174.85 ▼0.25100.98 ▼10.3742.34 ▲1.02
Posts /wp-admin/edit.php2,089 ▼32.02 ▲0.0236.83 ▼1.2131.78 ▲0.61
Add New Post /wp-admin/post-new.php1,514 ▼2817.69 ▼0.67670.91 ▲63.3661.82 ▲1.86
Media Library /wp-admin/upload.php1,391 ▲34.23 ▲0.10101.67 ▼12.2243.62 ▼6.44

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/copy-media-url/dc-media-url.php:11

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

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
3 plugin tags: uploads, media, wordpress

copy-media-url/dc-media-url.php 92% from 13 tests

The entry point to "Copy Media url" version 1.0.1 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("copy-media-url.php" instead of "dc-media-url.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin1,894 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript3167561,878
PHP14816

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin