72% um-plug

Code Review | UM-Plug

WordPress plugin UM-Plug scored 72% from 54 tests.

About plugin

  • Plugin page: um-plug
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8.1-3.9.1
  • WordPress version: 6.3.1
  • First release: Mar 29, 2014
  • Latest release: Jul 19, 2014
  • Number of updates: 29
  • Update frequency: every 4.0 days
  • Top authors: tacoen (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 969 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.25MB] [CPU: ▼9.02ms] Passed 4 tests

Server-side resources used by UM-Plug
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.88 ▲0.4141.19 ▼4.57
Dashboard /wp-admin3.62 ▲0.3136.49 ▼8.54
Posts /wp-admin/edit.php3.68 ▲0.3239.71 ▼7.44
Add New Post /wp-admin/post-new.php5.87 ▼0.0275.36 ▼15.53
Media Library /wp-admin/upload.php3.62 ▲0.3938.69 ▲6.90
Theme Options /wp-admin/admin.php?page=umt3.5934.94
Template Tool /wp-admin/admin.php?page=um_touch3.5932.55
Chunks /wp-admin/admin.php?page=um_chunk3.5934.24
Readme /wp-admin/admin.php?page=um_plug3.5931.87
Minified Options /wp-admin/admin.php?page=umr3.5931.94
Tweaks Options /wp-admin/admin.php?page=umo3.5935.39
UM Theme Setup /wp-admin/admin.php?page=um_setup3.5933.87

Server storage [IO: ▲1.03MB] [DB: ▲0.00MB] 67% from 3 tests

How much does this plugin use your filesystem and database?
Please fix the following
  • The plugin illegally modified 2 files (0.00KB) outside of "wp-content/plugins/um-plug/" and "wp-content/uploads/"
    • (deleted) license.txt
    • (deleted) readme.html
Filesystem: 143 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_recent-posts
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_um_chunked

Browser metrics Passed 4 tests

This is an overview of browser requirements for UM-Plug
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,859 ▲11314.36 ▼0.041.79 ▼0.1337.85 ▼10.58
Dashboard /wp-admin2,253 ▲625.87 ▲0.97106.91 ▼5.8836.23 ▼4.95
Posts /wp-admin/edit.php2,136 ▲472.10 ▲0.0640.89 ▲1.0731.24 ▼6.14
Add New Post /wp-admin/post-new.php1,557 ▲4323.36 ▲5.75708.79 ▲28.0363.37 ▲9.72
Media Library /wp-admin/upload.php1,435 ▲444.18 ▼0.10101.42 ▼1.7442.18 ▼3.33
Theme Options /wp-admin/admin.php?page=umt1,1131.8932.1130.28
Template Tool /wp-admin/admin.php?page=um_touch1,2562.0627.4030.03
Chunks /wp-admin/admin.php?page=um_chunk9522.0926.7727.40
Readme /wp-admin/admin.php?page=um_plug9702.0825.4858.41
Minified Options /wp-admin/admin.php?page=umr1,0062.2426.1228.77
Tweaks Options /wp-admin/admin.php?page=umo1,2142.2624.7128.02
UM Theme Setup /wp-admin/admin.php?page=um_setup1,2762.2224.9037.19

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_um_chunked

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=um_setup
    • > User deprecated in wp-includes/functions.php+5828
    Hook contextual_help is deprecated since version 3.3.0! Use get_current_screen()->add_help_tab(), get_current_screen()->remove_help_tab() instead.

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 18× PHP files output text when accessed directly (only 10 are shown):
    • > /wp-content/plugins/um-plug/addons/impress/function.php
    • > /wp-content/plugins/um-plug/um/ajax-adminpage.php
    • > /wp-content/plugins/um-plug/um/_etc.php
    • > /wp-content/plugins/um-plug/um/cdn.php
    • > /wp-content/plugins/um-plug/um/um-touch.php
    • > /wp-content/plugins/um-plug/um/um-setup.php
    • > /wp-content/plugins/um-plug/um/rewrites.php
    • > /wp-content/plugins/um-plug/min/index.php
    • > /wp-content/plugins/um-plug/um/ajax-wplogin.php
    • > /wp-content/plugins/um-plug/um/_common.php
  • 20× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Minify_Controller_Base' not found in wp-content/plugins/um-plug/min/lib/Minify/Controller/Files.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'Minify_Controller_Base' not found in wp-content/plugins/um-plug/min/lib/Minify/Controller/Groups.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function um_hp_register() in wp-content/plugins/um-plug/um/um-pagetemplate.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/um-plug/um/init.php:87
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/um-plug/prop/inc/umplug-setup.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/um-plug/um/custom-scheme.php:107
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/um-plug/prop/inc/umplug-setup.php on line 7
    • > PHP Fatal error
      The script "class.JavaScriptPacker.php" is required. Please see: http://code.google.com/p/minify/source/browse/trunk/min/lib/Minify/Packer.php in wp-content/plugins/um-plug/min/lib/Minify/Packer.php on line 21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_stylesheet_directory() in wp-content/plugins/um-plug/um/apply.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Minify_Controller_Base' not found in wp-content/plugins/um-plug/min/lib/Minify/Controller/MinApp.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
No tags were found

um-plug/um-plug.php 92% from 13 tests

Analyzing the main PHP file in "UM-Plug" version 1.2.0
Please make the necessary changes and fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin19,665 lines of code in 126 files:
LanguageFilesBlank linesComment linesLines of code
PHP741,6174,2528,369
CSS186781144,450
JSON1002,586
JavaScript194415182,267
HTML114641,583
Java17477231
SVG100120
Markdown126059

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Please tend to the following items
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 155)
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity29.22
▷ Minimum class complexity1.00
▷ Maximum class complexity229.00
Average method complexity5.58
▷ Minimum method complexity1.00
▷ Maximum method complexity155.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes51
▷ Abstract classes11.96%
▷ Concrete classes5098.04%
▷ Final classes00.00%
Methods315
▷ Static methods6921.90%
▷ Public methods19963.17%
▷ Protected methods5617.78%
▷ Private methods6019.05%
Functions148
▷ Named functions148100.00%
▷ Anonymous functions00.00%
Constants126
▷ Global constants9978.57%
▷ Class constants2721.43%
▷ Public constants27100.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 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
prop/noavatar.png0.94KB0.81KB▼ 14.18%