72% zu-media

Code Review | Zu Media

WordPress plugin Zu Media scored72%from 54 tests.

About plugin

  • Plugin page: zu-media
  • Plugin version: 2.3.3
  • PHP compatiblity: 7.2.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3.0-5.9.0
  • WordPress version: 6.3.1
  • First release: Apr 13, 2021
  • Latest release: Feb 13, 2022
  • Number of updates: 6
  • Update frequency: every 53.2 days
  • Top authors: dmitryrudakov (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,831 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲1.58MB] [CPU: ▲10.61ms] Passed 4 tests

Server-side resources used by Zu Media
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /5.06 ▲1.6051.11 ▲6.05
Dashboard /wp-admin4.88 ▲1.5758.85 ▲9.22
Posts /wp-admin/edit.php4.93 ▲1.5761.76 ▲8.07
Add New Post /wp-admin/post-new.php7.51 ▲1.62115.56 ▲21.42
Media Library /wp-admin/upload.php4.81 ▲1.5855.36 ▲19.11
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=attachment4.9265.47
/wp-admin/options-general.php?page=sep-46-0-464.5736.73
Location /wp-admin/edit-tags.php?taxonomy=location&post_type=attachment4.9263.06
Zu Media /wp-admin/options-general.php?page=zumedia-settings4.8259.26

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Zu Media
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲8213.18 ▼1.491.74 ▼0.1042.69 ▼2.83
Dashboard /wp-admin2,226 ▲354.86 ▼1.02110.34 ▼27.1244.23 ▼10.42
Posts /wp-admin/edit.php2,203 ▲1112.01 ▼0.0141.18 ▼2.5538.02 ▲0.38
Add New Post /wp-admin/post-new.php1,555 ▲2123.48 ▲0.52686.49 ▼4.9938.43 ▼16.29
Media Library /wp-admin/upload.php1,557 ▲1695.63 ▲1.38135.41 ▲32.2544.58 ▼1.09
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=attachment1,4232.1426.0829.48
/wp-admin/options-general.php?page=sep-46-0-46280.440.084.00
Location /wp-admin/edit-tags.php?taxonomy=location&post_type=attachment1,3812.1329.6230.86
Zu Media /wp-admin/options-general.php?page=zumedia-settings2,12014.66305.5740.48

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests 25% 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)
Good news, no errors were detected

SRP 0% 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
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/zu-media/zu-media.php
  • 8× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'zukit_Addon' not found in wp-content/plugins/zu-media/includes/addons/image-sizes.php:2
    • > PHP Warning
      Use of undefined constant HOUR_IN_SECONDS - assumed 'HOUR_IN_SECONDS' (this will throw an Error in a future version of PHP) in wp-content/plugins/zu-media/zukit/load.php on line 105
    • > PHP Fatal error
      Uncaught Error: Class 'zukit_Addon' not found in wp-content/plugins/zu-media/includes/addons/admin-colors.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'zukit_Addon' not found in wp-content/plugins/zu-media/includes/media-folders/zumedia-folders.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'zukit_Addon' not found in wp-content/plugins/zu-media/includes/addons/dominant-color.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'zukit_SingletonLogging' not found in wp-content/plugins/zu-media/zukit/snippets/hub.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'zukit_Plugin' not found in wp-content/plugins/zu-media/includes/zumedia-plugin.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'zukit_Addon' not found in wp-content/plugins/zu-media/zukit/zukit-blocks.php:8

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following browser errors
    • > GET request to /wp-admin/options-general.php?page=sep-46-0-46
    • > Network (severe)
    wp-admin/options-general.php?page=sep-46-0-46 - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
6 plugin tags: media library, gutenberg, folders, admin, dominant color...

zu-media/zu-media.php 85% from 13 tests

The primary PHP file in "Zu Media" version 2.3.3 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Domain Path: The domain path folder was not found ("/lang/")

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
No dangerous file extensions were detected6,393 lines of code in 66 files:
LanguageFilesBlank linesComment linesLines of code
PHP451,2828826,207
PO File25454150
SVG10013
JavaScript60011
CSS100010
JSON2002

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity24.73
▷ Minimum class complexity1.00
▷ Maximum class complexity88.00
Average method complexity3.03
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits34
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods550
▷ Static methods183.27%
▷ Public methods32258.55%
▷ Protected methods10318.73%
▷ Private methods12522.73%
Functions49
▷ Named functions1836.73%
▷ Anonymous functions3163.27%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin