84% moving-media-library

Code Review | Moving Media Library

WordPress plugin Moving Media Library scored84%from 54 tests.

About plugin

  • Plugin page: moving-media-library
  • Plugin version: 1.19
  • PHP compatiblity: 8.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.4
  • WordPress version: 6.3.1
  • First release: Apr 29, 2020
  • Latest release: Oct 29, 2023
  • Number of updates: 54
  • Update frequency: every 23.7 days
  • Top authors: Katsushi Kawamori (100%)

Code review

54 tests

User reviews

25 reviews

Install metrics

4,000+ active /44,753 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.15MB] [CPU: ▼1.45ms] Passed 4 tests

An overview of server-side resources used by Moving Media Library
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1641.75 ▲0.78
Dashboard /wp-admin3.45 ▲0.1547.30 ▼0.26
Posts /wp-admin/edit.php3.57 ▲0.2146.72 ▲0.32
Add New Post /wp-admin/post-new.php6.04 ▲0.1584.55 ▼3.82
Media Library /wp-admin/upload.php3.38 ▲0.1536.05 ▼2.05
Moving Media Library /wp-admin/admin.php?page=movingmedialibrary3.3432.54
Import /wp-admin/admin.php?page=movingmedialibrary-update-db3.3432.54
Export /wp-admin/admin.php?page=movingmedialibrary-generate-json3.3432.25

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Moving Media Library
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲5914.26 ▼0.151.70 ▲0.0245.71 ▲0.00
Dashboard /wp-admin2,229 ▲555.62 ▲0.0795.69 ▼7.2042.40 ▼1.57
Posts /wp-admin/edit.php2,131 ▲282.00 ▲0.0234.05 ▼2.0039.98 ▲2.19
Add New Post /wp-admin/post-new.php1,551 ▲2523.75 ▲0.65652.02 ▼58.3052.80 ▼3.82
Media Library /wp-admin/upload.php1,431 ▲284.23 ▼0.0098.79 ▼6.9742.73 ▼1.84
Moving Media Library /wp-admin/admin.php?page=movingmedialibrary8601.9923.5432.53
Import /wp-admin/admin.php?page=movingmedialibrary-update-db9422.0323.2337.03
Export /wp-admin/admin.php?page=movingmedialibrary-generate-json8372.0322.8426.13

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_upload_dir() in wp-content/plugins/moving-media-library/lib/class-movingmedialibraryadmin.php:50
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_upload_dir() in wp-content/plugins/moving-media-library/lib/class-movingmedialibrary.php:45
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_upload_dir() in wp-content/plugins/moving-media-library/lib/class-movingmedialibrary.php:45

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: media, media library, moving

moving-media-library/movingmedialibrary.php 92% from 13 tests

The entry point to "Moving Media Library" version 1.19 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("moving-media-library.php" instead of "movingmedialibrary.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin789 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP495188789

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity58.00
▷ Minimum class complexity34.00
▷ Maximum class complexity82.00
Average method complexity5.42
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods1392.86%
▷ Protected methods00.00%
▷ Private methods17.14%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.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
No PNG files were detected