83% rocket-media-library-mime-type

Code Review | Rocket Media Library Mime Type

WordPress plugin Rocket Media Library Mime Type scored83%from 54 tests.

About plugin

  • Plugin page: rocket-media-libr...
  • Plugin version: 2.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-5.4.2
  • WordPress version: 6.3.1
  • First release: Apr 18, 2015
  • Latest release: Jul 28, 2020
  • Number of updates: 42
  • Update frequency: every 45.9 days
  • Top authors: Qwerty_23 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,241 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.12MB] [CPU: ▼3.46ms] Passed 4 tests

This is a short check of server-side resources used by Rocket Media Library Mime Type
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0741.83 ▼2.70
Dashboard /wp-admin3.43 ▲0.1351.95 ▼6.27
Posts /wp-admin/edit.php3.55 ▲0.1953.86 ▲2.61
Add New Post /wp-admin/post-new.php6.02 ▲0.1396.93 ▼7.46
Media Library /wp-admin/upload.php3.36 ▲0.1341.06 ▲4.42
업로드 파일 타입 /wp-admin/options-general.php?page=rocket-media-library-mime-type-setting3.3835.84

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 22 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-posts
rocket_media_library_mime_type
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Rocket Media Library Mime Type
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,866 ▲10514.40 ▼0.191.87 ▲0.0143.06 ▼0.81
Dashboard /wp-admin2,247 ▲705.75 ▲0.2098.50 ▼1.0444.46 ▼4.29
Posts /wp-admin/edit.php2,152 ▲522.33 ▲0.3248.24 ▲0.0741.95 ▲2.42
Add New Post /wp-admin/post-new.php1,541 ▲923.42 ▲0.32678.42 ▲35.9868.52 ▲13.04
Media Library /wp-admin/upload.php1,510 ▲1104.38 ▲0.17109.65 ▲8.2154.80 ▲11.01
업로드 파일 타입 /wp-admin/options-general.php?page=rocket-media-library-mime-type-setting2,5312.9369.46164.39

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • rocket_media_library_mime_type
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • 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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function rocket_media_library_mime_type\\plugin_dir_path() in wp-content/plugins/rocket-media-library-mime-type/rocket-media-library-mime-type.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function site_url() in wp-content/plugins/rocket-media-library-mime-type/assets/templates/admin/setting.php:93
    • > PHP Fatal error
      Uncaught Error: Class 'rocket_media_library_mime_type\\Feature' not found in wp-content/plugins/rocket-media-library-mime-type/features/admin/setting.php:5

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

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: wordpress korean media library upload file type, rocket upload file type, rocket media

rocket-media-library-mime-type/rocket-media-library-mime-type.php 69% from 13 tests

Analyzing the main PHP file in "Rocket Media Library Mime Type" version 2.1.0
You should first fix the following items:
  • Text Domain: The text domain should only use lowercase characters and dashes
  • Domain Path: Prefix the domain path with a forward slash character ("/languages/")
  • Description: Please keep the plugin description shorter than 140 characters (currently 169 characters long)
  • Domain Path: Use only dashes and lowercase characters for the domain path ("languages/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin790 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP9188149790
JavaScript1100

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity8.00
▷ Minimum class complexity1.00
▷ Maximum class complexity28.00
Average method complexity2.22
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods46
▷ Static methods1736.96%
▷ Public methods4393.48%
▷ Protected methods00.00%
▷ Private methods36.52%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
6 PNG files occupy 1.13MB with 0.67MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/Screenshot-4.png197.02KB62.01KB▼ 68.52%
assets/images/Screenshot-2.png10.53KB4.63KB▼ 56.00%
assets/images/Screenshot-3.png53.57KB25.04KB▼ 53.26%
assets/images/Screenshot-6.png422.23KB149.05KB▼ 64.70%
assets/images/Screenshot-1.png54.00KB25.21KB▼ 53.31%