10% unite-mobile-optimizer-menu

Code Review | Unite Mobile Optimizer Menu

WordPress plugin Unite Mobile Optimizer Menu scored10%from 54 tests.

About plugin

  • Plugin page: unite-mobile-opti...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-3.8
  • WordPress version: 6.3.1
  • First release: Feb 4, 2014
  • Latest release: Feb 4, 2014
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: amitkeren (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /894 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/unite-mobile-optimizer-menu/unite-mobile-optimizer-menu.php+14
    Only variables should be passed by reference

Server metrics [RAM: ▼1.96MB] [CPU: ▼52.30ms] Passed 4 tests

Analyzing server-side resources used by Unite Mobile Optimizer Menu
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.24 ▼36.13
Dashboard /wp-admin2.05 ▼1.265.71 ▼38.80
Posts /wp-admin/edit.php2.05 ▼1.315.31 ▼49.26
Add New Post /wp-admin/post-new.php2.05 ▼3.846.52 ▼85.00
Media Library /wp-admin/upload.php2.05 ▼1.185.06 ▼34.15

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Unite Mobile Optimizer Menu
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,965 ▲17913.53 ▼1.039.42 ▲7.4949.50 ▲2.29
Dashboard /wp-admin2,224 ▲535.63 ▼0.0787.52 ▼3.8576.77 ▲33.60
Posts /wp-admin/edit.php2,132 ▲292.07 ▲0.0435.68 ▼1.2133.18 ▼3.35
Add New Post /wp-admin/post-new.php1,545 ▲1723.25 ▲1.96759.64 ▲75.3160.94 ▲8.82
Media Library /wp-admin/upload.php1,423 ▲294.18 ▼0.01100.68 ▼10.6376.78 ▲31.82

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/unite-mobile-optimizer-menu/unite-mobile-optimizer-menu.php+14
    Only variables should be passed by reference
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% 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)
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/unite-mobile-optimizer-menu/template/css.php
    • > /wp-content/plugins/unite-mobile-optimizer-menu/template/menu.php
  • 24× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Undefined variable: link5_enable in wp-content/plugins/unite-mobile-optimizer-menu/template/menu.php on line 22
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/unite-mobile-optimizer-menu/lib/class.umom-menu.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/unite-mobile-optimizer-menu/template/settings.php:2
    • > PHP Notice
      Undefined variable: link1_enable in wp-content/plugins/unite-mobile-optimizer-menu/template/menu.php on line 10
    • > PHP Notice
      Undefined variable: icon_color in wp-content/plugins/unite-mobile-optimizer-menu/template/css.php on line 142
    • > PHP Notice
      Undefined variable: background_color in wp-content/plugins/unite-mobile-optimizer-menu/template/css.php on line 95
    • > PHP Notice
      Undefined variable: background_color in wp-content/plugins/unite-mobile-optimizer-menu/template/css.php on line 47
    • > PHP Notice
      Undefined variable: link2_enable in wp-content/plugins/unite-mobile-optimizer-menu/template/menu.php on line 13
    • > PHP Notice
      Undefined variable: mediaqueries in wp-content/plugins/unite-mobile-optimizer-menu/template/css.php on line 198
    • > PHP Notice
      Undefined variable: icon_color in wp-content/plugins/unite-mobile-optimizer-menu/template/css.php on line 66

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === unite-mobile-optimizer-menu === )
  • Tags: Please reduce the number of tags, currently 15 tag instead of maximum 10
You can look at the official readme.txt

unite-mobile-optimizer-menu/unite-mobile-optimizer-menu.php 92% from 13 tests

The main PHP file in "Unite Mobile Optimizer Menu" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 158 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin4,351 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP530392,582
CSS2091,337
SVG100414
JavaScript10018

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.98
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.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
6 PNG files occupy 0.14MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/trigger.png1.37KB0.88KB▼ 36.27%
screenshot-1.png43.06KB18.73KB▼ 56.49%
screenshot-2.png32.26KB12.91KB▼ 59.98%
images/gradient.png13.41KB8.33KB▼ 37.90%
images/rainbow.png2.64KB1.74KB▼ 34.05%