84% gallery-media-tags

Code Review | Gallery Media Tags

WordPress plugin Gallery Media Tags scored84%from 54 tests.

About plugin

  • Plugin page: gallery-media-tags
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.9.1
  • WordPress version: 6.3.1
  • First release: Jul 29, 2017
  • Latest release: Dec 27, 2017
  • Number of updates: 24
  • Update frequency: every 6.3 days
  • Top authors: yonifre (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /5,437 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼8.01ms] Passed 4 tests

A check of server-side resources used by Gallery Media Tags
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1140.46 ▼1.69
Dashboard /wp-admin3.41 ▲0.0646.90 ▼19.10
Posts /wp-admin/edit.php3.46 ▲0.1047.53 ▲4.31
Add New Post /wp-admin/post-new.php5.99 ▲0.1083.94 ▼15.56
Media Library /wp-admin/upload.php3.33 ▲0.1035.21 ▲4.71
Media Tags /wp-admin/edit-tags.php?taxonomy=media_tag&post_type=attachment3.3233.09

Server storage [IO: ▲0.95MB] [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: 26 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_mpmt
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Gallery Media Tags: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,920 ▲14914.12 ▼0.198.83 ▲6.6842.50 ▼0.51
Dashboard /wp-admin2,207 ▲195.80 ▲0.88104.46 ▼9.7637.79 ▼1.56
Posts /wp-admin/edit.php2,093 ▲42.02 ▼0.0438.89 ▼2.5234.52 ▼2.35
Add New Post /wp-admin/post-new.php1,536 ▼623.21 ▲4.75600.39 ▼27.2048.69 ▼6.26
Media Library /wp-admin/upload.php1,386 ▲44.17 ▼0.0496.32 ▼6.0541.66 ▼0.99
Media Tags /wp-admin/edit-tags.php?taxonomy=media_tag&post_type=attachment1,2662.1429.6031.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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_mpmt
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, 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 take a closer look at the following
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gallery-media-tags/inc/media-meta-boxes.php:75
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gallery-media-tags/inc/functions.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/gallery-media-tags/inc/widget-api.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gallery-media-tags/inc/tag-taxonomy.php:36

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 13 tag instead of maximum 10
Please take inspiration from this readme.txt

gallery-media-tags/gallery-media-tags.php Passed 13 tests

The main PHP script in "Gallery Media Tags" version 1.1.0 is automatically included on every request by WordPress
52 characters long description:
Simple tags gallery that managed by WordPress media.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin4,590 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript59424063,289
CSS3121135563
PHP612659448
HTML1460205
PO File1353684
SVG1001

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity23.50
▷ Minimum class complexity10.00
▷ Maximum class complexity37.00
Average method complexity5.00
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions770.00%
▷ Anonymous functions330.00%
Constants2
▷ Global constants2100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/PhotoSwipe/default-skin/default-skin.png0.53KB0.72KB0.00%