83% media-upload-meta-box

Code Review | Name: Media Upload Meta Box

WordPress plugin Name: Media Upload Meta Boxscored83%from 54 tests.

About plugin

  • Plugin page: media-upload-meta...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.5.1
  • WordPress version: 6.3.1
  • First release: May 5, 2013
  • Latest release: May 27, 2013
  • Number of updates: 7
  • Update frequency: every 3.3 days
  • Top authors: ChrisHurst (71.43%)MyWebsiteAdvisor (42.86%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /4,127 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: ▼6.82ms] Passed 4 tests

A check of server-side resources used by Name: Media Upload Meta Box
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.25 ▲2.20
Dashboard /wp-admin3.32 ▼0.0347.17 ▼15.36
Posts /wp-admin/edit.php3.37 ▲0.0143.29 ▲0.03
Add New Post /wp-admin/post-new.php5.90 ▲0.0184.54 ▼10.35
Media Library /wp-admin/upload.php3.24 ▲0.0134.28 ▼1.60

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Name: Media Upload Meta Box
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲3914.28 ▼0.371.68 ▼0.0943.05 ▼2.69
Dashboard /wp-admin2,198 ▲215.61 ▼0.0695.31 ▲4.0642.27 ▼3.67
Posts /wp-admin/edit.php2,100 ▼32.02 ▲0.0333.17 ▼1.2134.66 ▲2.25
Add New Post /wp-admin/post-new.php6,333 ▲4,80519.08 ▼4.17887.62 ▲199.4172.61 ▲16.03
Media Library /wp-admin/upload.php1,403 ▲64.18 ▲0.0196.80 ▼9.6138.98 ▼5.61

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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/media-upload-meta-box/media-upload-meta-box.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 81% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (Example meta box before image upload.), #2 (Example meta box during image upload.), #3 (Example meta box after image upload.)
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === Name: Media Upload Meta Box=== )
  • Tags: There are too many tags (13 tag instead of maximum 10)
The official readme.txt might help

media-upload-meta-box/media-upload-meta-box.php Passed 13 tests

The main PHP file in "Name: Media Upload Meta Box" ver. 1.0.2 adds more information about the plugin and also serves as the entry point for this plugin
76 characters long description:
Adds a Meta Box for Drag and Drop Media Upload to the edit page/post screens

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
There were no executable files found in this plugin56 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1361856

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin