78% used-media-identifier

Code Review | Used Media Identifier

WordPress plugin Used Media Identifier scored78%from 54 tests.

About plugin

  • Plugin page: used-media-identi...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.8.1
  • WordPress version: 6.3.1
  • First release: Sep 6, 2017
  • Latest release: Sep 6, 2017
  • Number of updates: 31
  • Update frequency: every 0.1 days
  • Top authors: glorywebs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /626 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.08MB] [CPU: ▼10.44ms] Passed 4 tests

A check of server-side resources used by Used Media Identifier
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.2137.98 ▼3.72
Dashboard /wp-admin3.50 ▲0.1546.20 ▼12.44
Posts /wp-admin/edit.php3.63 ▲0.2747.58 ▲2.09
Add New Post /wp-admin/post-new.php5.65 ▼0.2371.81 ▼21.68
Media Library /wp-admin/upload.php3.41 ▲0.1831.83 ▼3.91
Media Identifier Settings /wp-admin/options-general.php?page=media-identifier-settings3.3931.35

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 24 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Used Media Identifier
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,962 ▲21613.74 ▼0.644.66 ▲2.6936.93 ▼6.02
Dashboard /wp-admin2,285 ▲944.83 ▼0.03101.14 ▼5.4241.91 ▲0.61
Posts /wp-admin/edit.php2,171 ▲792.04 ▲0.0134.42 ▼2.8935.23 ▲0.74
Add New Post /wp-admin/post-new.php1,592 ▲7323.41 ▲0.22633.75 ▼34.3751.15 ▼4.96
Media Library /wp-admin/upload.php1,457 ▲694.19 ▼0.0398.99 ▼0.6042.85 ▼3.31
Media Identifier Settings /wp-admin/options-general.php?page=media-identifier-settings1,2861.6926.1929.62

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=media-identifier-settings
    • > Notice in wp-content/plugins/used-media-identifier/admin/class-used-media-identifier-admin.php+1070
    Only variables should be passed by reference

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
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/used-media-identifier/admin/partials/used-media-identifier-admin-display.php
    • > /wp-content/plugins/used-media-identifier/public/partials/used-media-identifier-public-display.php

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% 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
Attributes that require attention:
  • Plugin Name: Please specify the plugin name on the first line ( === used-media-identifier === )
The official readme.txt might help

used-media-identifier/used-media-identifier.php Passed 13 tests

The primary PHP file in "Used Media Identifier" version 1.0.0 is used by WordPress to initiate all plugin functionality
69 characters long description:
This plugin is used to identify media image is used for any post type

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
No dangerous file extensions were detected1,430 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP132356011,388
CSS20426
JavaScript272716

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity7.00
▷ Minimum class complexity1.00
▷ Maximum class complexity29.00
Average method complexity2.55
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods31
▷ Static methods26.45%
▷ Public methods2683.87%
▷ Protected methods00.00%
▷ Private methods516.13%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/badge.png1.64KB0.63KB▼ 61.34%