79% wow-media-library-fix

Code Review | Fix Media Library

WordPress plugin Fix Media Library scored 79% from 54 tests.

About plugin

  • Plugin page: wow-media-library...
  • Plugin version: 2.0
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.0
  • WordPress version: 5.8.1
  • First release: May 25, 2018
  • Latest release: Dec 18, 2018
  • Number of updates: 12
  • Update frequency: every 46.1 days
  • Top authors: wowpresshost (100%)

Code review

54 tests

User reviews

28 reviews

Install metrics

4,000+ active / 28,130 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 successfully, without throwing any errors or notices

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

Server-side resources used by Fix Media Library
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1242.96 ▲16.93
Dashboard /wp-admin3.08 ▲0.0357.48 ▼13.19
Posts /wp-admin/edit.php3.13 ▲0.0351.30 ▲2.70
Add New Post /wp-admin/post-new.php5.44 ▲0.0186.69 ▼580.80
Media Library /wp-admin/upload.php3.02 ▲0.0228.31 ▼2.55
Fix Media Library /wp-admin/tools.php?page=wow_media_library_fix2.9421.53

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 18 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Fix Media Library
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,708 ▲13615.88 ▼0.059.75 ▼0.0350.38 ▼18.77
Dashboard /wp-admin2,975 ▲445.92 ▼0.06160.95 ▼51.07125.87 ▼10.71
Posts /wp-admin/edit.php2,744 ▲52.70 ▲0.0279.23 ▼6.53122.11 ▲1.84
Add New Post /wp-admin/post-new.php1,686 ▲10518.09 ▼1.80369.81 ▼42.56131.58 ▲14.32
Media Library /wp-admin/upload.php1,812 ▲55.01 ▲0.01160.30 ▼18.12138.15 ▲3.24
Fix Media Library /wp-admin/tools.php?page=wow_media_library_fix1,4822.3564.1887.60

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Warning in wp-content/plugins/wow-media-library-fix/Activation.php+13
    unlink(wp-content/uploads/media-library.log): No such file or directory

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/tools.php?page=wow_media_library_fix
    • > User notice in wp-includes/functions.php+5663
    WP_Scripts::localize was called incorrectly. The $l10n parameter must be an array. To pass arbitrary data to scripts, use the wp_add_inline_script() function instead. Please see Debugging in WordPress for more information. (This message was added in version 5.7.0.)

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
Almost there! Just fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WowMediaLibraryFix\\wp_nonce_field() in wp-content/plugins/wow-media-library-fix/AdminPage_View.php:13
    • > PHP Notice
      Undefined variable: messages in wp-content/plugins/wow-media-library-fix/AdminPage_View.php on line 9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
8 plugin tags: thumbnails, clean, thumbnail, attachments, post thumbnail...

wow-media-library-fix/wow-media-library-fix.php Passed 13 tests

The main file in "Fix Media Library" v. 2.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
19 characters long description:
Fixes Media Library

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin1,732 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP15428751,548
JavaScript1540168
CSS12016

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity15.08
▷ Minimum class complexity1.00
▷ Maximum class complexity61.00
Average method complexity3.95
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
Methods62
▷ Static methods3353.23%
▷ Public methods5182.26%
▷ Protected methods00.00%
▷ Private methods1117.74%
Functions1
▷ Named functions1100.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
No PNG files were detected