83% media-used-search

Code Review | Media Used Search

WordPress plugin Media Used Search scored83%from 54 tests.

About plugin

  • Plugin page: media-used-search
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.2.1
  • WordPress version: 6.3.1
  • First release: May 7, 2015
  • Latest release: May 7, 2015
  • Number of updates: 3
  • Update frequency: every 1.3 days
  • Top authors: iga-ryo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /863 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.07MB] [CPU: ▼2.60ms] Passed 4 tests

Server-side resources used by Media Used Search
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.08 ▼3.77
Dashboard /wp-admin3.40 ▲0.1047.31 ▼0.35
Posts /wp-admin/edit.php3.51 ▲0.1549.05 ▲1.65
Add New Post /wp-admin/post-new.php5.98 ▲0.0992.31 ▼7.92
Media Library /wp-admin/upload.php3.32 ▲0.0940.97 ▲9.43
Media Used Search /wp-admin/options-general.php?page=mus_admin3.3035.14

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 12 new options
New WordPress options
widget_recent-posts
mus_plg_post_types_opt_name
mus_plg_ttl_omit_border
mus_plg_post_metas
theysaidso_admin_options
widget_recent-comments
mus_plg_ttl_omit_border_opt_name
mus_plg_post_metas_opt_name
can_compress_scripts
db_upgraded
...

Browser metrics Passed 4 tests

An overview of browser requirements for Media Used Search
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲8713.29 ▼1.001.86 ▲0.2339.30 ▼4.28
Dashboard /wp-admin2,214 ▲404.93 ▼0.95112.12 ▲6.7842.44 ▼0.26
Posts /wp-admin/edit.php2,097 ▲82.18 ▲0.2143.58 ▲2.4535.29 ▼0.78
Add New Post /wp-admin/post-new.php1,531 ▼618.33 ▼4.81594.42 ▼89.4557.69 ▼10.62
Media Library /wp-admin/upload.php1,390 ▲24.29 ▲0.0398.08 ▼0.1540.70 ▼3.56
Media Used Search /wp-admin/options-general.php?page=mus_admin9432.2724.3626.97

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/media-used-search/bootstrap.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'Media_Used_Search' not found in wp-content/plugins/media-used-search/admin.php:2

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Donate link: Invalid URI found ("")
  • Screenshots: These screenshots require images: #1 (Image of the media list.), #2 (Image of the setting screen.)
The official readme.txt might help

media-used-search/bootstrap.php 85% from 13 tests

The principal PHP file in "Media Used Search" v. 1.0.0 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("media-used-search.php" instead of "bootstrap.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 207 characters long)

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
Good job! No executable or dangerous file extensions detected651 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP468175480
PO File1266167
Sass11067
JavaScript22536
CSS1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity73.00
▷ Minimum class complexity73.00
▷ Maximum class complexity73.00
Average method complexity3.57
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods28
▷ Static methods13.57%
▷ Public methods2278.57%
▷ Protected methods00.00%
▷ Private methods621.43%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.15MB with 0.11MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png65.63KB19.36KB▼ 70.51%
screenshot-2.png87.35KB24.96KB▼ 71.43%