83% lh-copy-media-file

Code Review | LH Copy Media File

WordPress plugin LH Copy Media File scored83%from 54 tests.

About plugin

  • Plugin page: lh-copy-media-file
  • Plugin version: 1.08
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Mar 31, 2016
  • Latest release: Apr 17, 2021
  • Number of updates: 12
  • Update frequency: every 153.6 days
  • Top authors: shawfactor (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

1,000+ active /11,309 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

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

A check of server-side resources used by LH Copy Media File
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0139.78 ▼4.83
Dashboard /wp-admin3.32 ▲0.0248.72 ▼5.49
Posts /wp-admin/edit.php3.37 ▲0.0148.98 ▼4.01
Add New Post /wp-admin/post-new.php5.90 ▲0.0185.15 ▼17.31
Media Library /wp-admin/upload.php3.24 ▲0.0137.23 ▼1.50

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for LH Copy Media File
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.74 ▲0.391.75 ▼0.4342.02 ▼3.23
Dashboard /wp-admin2,195 ▲155.51 ▼0.1186.34 ▼7.9739.58 ▼8.26
Posts /wp-admin/edit.php2,097 ▼32.01 ▲0.0135.34 ▼5.5130.33 ▼8.27
Add New Post /wp-admin/post-new.php1,526 ▼923.75 ▲5.57678.47 ▲33.8664.16 ▲2.23
Media Library /wp-admin/upload.php1,400 ▼34.23 ▲0.0598.87 ▼3.4142.88 ▼4.54

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • 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
Everything seems fine, however this is by no means an exhaustive test

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
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/lh-copy-media-file/lh-copy-media-file.php:132

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Requires at least: Invalid version format
Please take inspiration from this readme.txt

lh-copy-media-file/lh-copy-media-file.php 85% from 13 tests

The entry point to "LH Copy Media File" version 1.08 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Text Domain: The text domain should only use lowercase characters and dashes
  • Description: The description should be shorter than 140 characters (currently 174 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin213 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP321641213

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity20.50
▷ Minimum class complexity7.00
▷ Maximum class complexity34.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods13
▷ Static methods969.23%
▷ Public methods969.23%
▷ Protected methods00.00%
▷ Private methods430.77%
Functions0
▷ Named functions00.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
PNG images were not found in this plugin