84% better-media-library-fields

Code Review | Better Media Library Fields

WordPress plugin Better Media Library Fields scored84%from 54 tests.

About plugin

  • Plugin page: better-media-libr...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.1
  • WordPress version: 6.3.1
  • First release: Jan 30, 2014
  • Latest release: Jan 11, 2015
  • Number of updates: 6
  • Update frequency: every 57.8 days
  • Top authors: bradvin (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

100+ active /2,904 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

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

An overview of server-side resources used by Better Media Library Fields
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0134.94 ▼1.90
Dashboard /wp-admin3.31 ▲0.0140.72 ▼6.03
Posts /wp-admin/edit.php3.36 ▲0.0147.76 ▼2.34
Add New Post /wp-admin/post-new.php5.89 ▲0.0176.81 ▼24.85
Media Library /wp-admin/upload.php3.24 ▲0.0138.17 ▲6.39

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Better Media Library Fields
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.66 ▼0.741.96 ▲0.2937.46 ▼3.02
Dashboard /wp-admin2,209 ▲215.89 ▲0.04112.45 ▲10.5443.00 ▲1.02
Posts /wp-admin/edit.php2,089 ▼01.97 ▼0.1539.54 ▼0.8234.56 ▼3.95
Add New Post /wp-admin/post-new.php1,514 ▼023.38 ▲5.83668.14 ▼16.3849.46 ▼5.15
Media Library /wp-admin/upload.php1,391 ▲64.18 ▼0.0496.33 ▼2.7841.97 ▼3.71

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • 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
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 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/better-media-library-fields/bmlf.php:28

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 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: image alt, media, media library, image caption

better-media-library-fields/bmlf.php 85% from 13 tests

The primary PHP file in "Better Media Library Fields" version 1.0.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("better-media-library-fields.php" instead of "bmlf.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 277 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin45 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP192331
Markdown113014

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin