78% cute-mediainfo

Code Review | Cute MediaInfo

WordPress plugin Cute MediaInfo scored 78% from 54 tests.

About plugin

  • Plugin page: cute-mediainfo
  • Plugin version: 1.0.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.9
  • WordPress version: 6.3.1
  • First release: Feb 2, 2022
  • Latest release: Mar 2, 2022
  • Number of updates: 15
  • Update frequency: every 1.9 days
  • Top authors: tauri77 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 663 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.65MB] [CPU: ▲2.50ms] Passed 4 tests

This is a short check of server-side resources used by Cute MediaInfo
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.73 ▲0.2741.94 ▲3.47
Dashboard /wp-admin4.12 ▲0.8153.41 ▲5.80
Posts /wp-admin/edit.php4.17 ▲0.8258.26 ▲13.14
Add New Post /wp-admin/post-new.php6.70 ▲0.8193.10 ▼7.38
Media Library /wp-admin/upload.php3.96 ▲0.7341.55 ▲8.10
Audio Languages /wp-admin/edit-tags.php?taxonomy=cutemi_audio_langs&post_type=cute_mediainfo4.1180.14
Audio Techs /wp-admin/edit-tags.php?taxonomy=cutemi_audio_tech&post_type=cute_mediainfo4.1086.01
Video Bitrate Modes /wp-admin/edit-tags.php?taxonomy=cutemi_video_bitrate_mode&post_type=cute_mediainfo4.0965.21
Text Formats /wp-admin/edit-tags.php?taxonomy=cutemi_text_format&post_type=cute_mediainfo4.0980.15
Text Languages /wp-admin/edit-tags.php?taxonomy=cutemi_text_langs&post_type=cute_mediainfo4.1179.66
Audio Channels /wp-admin/edit-tags.php?taxonomy=cutemi_audio_channels&post_type=cute_mediainfo4.0979.26
Video Resolutions /wp-admin/edit-tags.php?taxonomy=cutemi_video_resolution&post_type=cute_mediainfo4.1087.29
Add New MediaInfo /wp-admin/post-new.php?post_type=cute_mediainfo4.45139.51
Text Types /wp-admin/edit-tags.php?taxonomy=cutemi_text_type&post_type=cute_mediainfo4.0859.78
Video Techs /wp-admin/edit-tags.php?taxonomy=cutemi_video_tech&post_type=cute_mediainfo4.0980.88

Server storage [IO: ▲14.36MB] [DB: ▲0.02MB] Passed 3 tests

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 909 new files
Database: no new tables, 28 new options
New WordPress options
cutemi_text_format_children
cutemi_css_integrity
cutemi_svg_head_colorized
cutemi_audio_tech_children
widget_theysaidso_widget
db_upgraded
cutemi_profiles
cutemi_audio_langs_children
cutemi_hide_offline
cutemi_pending_css
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Cute MediaInfo
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,058 ▲32314.80 ▲0.162.05 ▲0.2336.09 ▼5.76
Dashboard /wp-admin2,430 ▲2396.58 ▲0.49128.68 ▲28.4141.62 ▲0.74
Posts /wp-admin/edit.php2,336 ▲2473.32 ▲1.3455.14 ▲21.7737.23 ▲3.60
Add New Post /wp-admin/post-new.php6,662 ▲5,14322.02 ▼1.44873.71 ▲191.2739.76 ▼8.95
Media Library /wp-admin/upload.php1,478 ▲994.14 ▼0.0384.05 ▼18.7544.02 ▼0.05
Audio Languages /wp-admin/edit-tags.php?taxonomy=cutemi_audio_langs&post_type=cute_mediainfo3,6303.1547.7175.81
Audio Techs /wp-admin/edit-tags.php?taxonomy=cutemi_audio_tech&post_type=cute_mediainfo2,0923.2743.8087.05
Video Bitrate Modes /wp-admin/edit-tags.php?taxonomy=cutemi_video_bitrate_mode&post_type=cute_mediainfo1,7573.2739.3673.60
Text Formats /wp-admin/edit-tags.php?taxonomy=cutemi_text_format&post_type=cute_mediainfo1,9943.1440.9368.58
Text Languages /wp-admin/edit-tags.php?taxonomy=cutemi_text_langs&post_type=cute_mediainfo3,6213.2541.6678.61
Audio Channels /wp-admin/edit-tags.php?taxonomy=cutemi_audio_channels&post_type=cute_mediainfo1,9143.1742.5467.66
Video Resolutions /wp-admin/edit-tags.php?taxonomy=cutemi_video_resolution&post_type=cute_mediainfo1,9703.1741.3366.88
Add New MediaInfo /wp-admin/post-new.php?post_type=cute_mediainfo4,3584.78142.1347.65
Text Types /wp-admin/edit-tags.php?taxonomy=cutemi_text_type&post_type=cute_mediainfo1,7153.2942.6170.92
Video Techs /wp-admin/edit-tags.php?taxonomy=cutemi_video_tech&post_type=cute_mediainfo1,9383.2641.2372.94

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 28 options
    • widget_recent-comments
    • cutemi_audio_tech_children
    • cutemi_audio_langs_children
    • cutemi_profiles
    • cutemi_google_fonts
    • cutemi_purge_on_uninstall
    • cutemi_css_version
    • widget_recent-posts
    • cutemi_video_resolution_children
    • cutemi_text_langs_children
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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 fix the following
  • 38× PHP files output non-empty strings when accessed directly via GET requests (only 10 are shown):
    • > /wp-content/plugins/cute-mediainfo/includes/class-cutemi-walker-taxonomy-single-term.php
    • > /wp-content/plugins/cute-mediainfo/admin/class-cute-mediainfo-settings.php
    • > /wp-content/plugins/cute-mediainfo/includes/links/link-sources/class-cutemi-clicknupload-data-extract.php
    • > /wp-content/plugins/cute-mediainfo/includes/block/block.php
    • > /wp-content/plugins/cute-mediainfo/cute-mediainfo.php
    • > /wp-content/plugins/cute-mediainfo/includes/links/link-sources/class-cutemi-usersdrive-data-extract.php
    • > /wp-content/plugins/cute-mediainfo/includes/links/link-sources/class-cutemi-dailyuploads-data-extract.php
    • > /wp-content/plugins/cute-mediainfo/includes/links/link-sources/class-cutemi-katfile-data-extract.php
    • > /wp-content/plugins/cute-mediainfo/admin/customizer/class-cutemi-fake-pages-preview.php
    • > /wp-content/plugins/cute-mediainfo/includes/links/link-sources/class-cutemi-link-source-base.php
  • 27× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      require(): Failed opening required 'CUTE_MEDIAINFO_DIR/admin/install/taxonomies/cutemi-site-source.php' (include_path='.:/usr/share/php') in wp-content/plugins/cute-mediainfo/admin/install/taxonomies/load-terms.php on line 5
    • > PHP Notice
      Undefined variable: mediainfo in wp-content/plugins/cute-mediainfo/templates/cutemi-excerpt-template.php on line 35
    • > PHP Fatal error
      Uncaught Error: Class 'CUTEMI_Taxonomy_Customs_Metas' not found in wp-content/plugins/cute-mediainfo/admin/includes/taxonomy-meta/class-cutemi-taxonomy-text-langs-metas.php:3
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/cute-mediainfo/templates/cutemi-excerpt-template.php on line 35
    • > PHP Fatal error
      Uncaught Error: Class 'CUTEMI_Taxonomy_Customs_Metas' not found in wp-content/plugins/cute-mediainfo/admin/includes/taxonomy-meta/class-cutemi-taxonomy-video-bitrates-metas.php:3
    • > PHP Warning
      require(CUTE_MEDIAINFO_DIR/admin/install/taxonomies/cutemi-site-source.php): failed to open stream: No such file or directory in wp-content/plugins/cute-mediainfo/admin/install/taxonomies/load-terms.php on line 5
    • > PHP Fatal error
      require_once(): Failed opening required 'CUTE_MEDIAINFO_DIR/includes/color2filter/class-cutemi-color.php' (include_path='.:/usr/share/php') in wp-content/plugins/cute-mediainfo/includes/color2filter/color2filter.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'CUTEMI_Taxonomy_Customs_Metas' not found in wp-content/plugins/cute-mediainfo/admin/includes/taxonomy-meta/class-cutemi-taxonomy-video-resolutions-metas.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'CUTEMI_Taxonomy_Customs_Metas' not found in wp-content/plugins/cute-mediainfo/admin/includes/taxonomy-meta/class-cutemi-taxonomy-audio-bitrate-modes-metas.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'CUTEMI_Taxonomy_Customs_Metas' not found in wp-content/plugins/cute-mediainfo/admin/includes/taxonomy-meta/class-cutemi-taxonomy-audio-channels-metas.php:3

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 on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: video info, video links, mediainfo

cute-mediainfo/cute-mediainfo.php Passed 13 tests

"Cute MediaInfo" version 1.0.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
65 characters long description:
Mediainfo for humans. Cute way to display video file information.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin38,949 lines of code in 881 files:
LanguageFilesBlank linesComment linesLines of code
PHP1032,1052,09332,232
JavaScript193022442,264
CSS6214552,146
PO File15697081,312
SVG74900848
Sass2150115
JSON10032

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity26.29
▷ Minimum class complexity1.00
▷ Maximum class complexity215.00
Average method complexity4.12
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes62
▷ Abstract classes00.00%
▷ Concrete classes62100.00%
▷ Final classes00.00%
Methods474
▷ Static methods5912.45%
▷ Public methods40585.44%
▷ Protected methods40.84%
▷ Private methods6513.71%
Functions72
▷ Named functions5576.39%
▷ Anonymous functions1723.61%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
14 PNG files occupy 0.61MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-256x256.png10.14KB4.70KB▼ 53.62%
admin/assets/jquery-ui/images/ui-icons_cc0000_256x240.png4.51KB4.18KB▼ 7.28%
admin/assets/jquery-ui/images/ui-icons_000000_256x240.png5.45KB4.18KB▼ 23.29%
admin/customizer/assets/transparency-grid.png2.58KB2.80KB0.00%
admin/assets/jquery-ui/images/ui-icons_ffffff_256x240.png6.33KB4.18KB▼ 33.99%