74% universo-widget-and-mobile-redirect

Code Review | Universo Widget and Mobile Redirect

WordPress plugin Universo Widget and Mobile Redirect scored74%from 54 tests.

About plugin

  • Plugin page: universo-widget-a...
  • Plugin version: 2.4.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.5-3.3.2
  • WordPress version: 6.3.1
  • First release: Feb 29, 2012
  • Latest release: Feb 19, 2013
  • Number of updates: 19
  • Update frequency: every 18.7 days
  • Top authors: russoedu (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,891 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼1.13MB] [CPU: ▼40.76ms] Passed 4 tests

Analyzing server-side resources used by Universo Widget and Mobile Redirect
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.84 ▼0.6317.00 ▼22.55
Dashboard /wp-admin2.89 ▼0.4218.44 ▼32.67
Posts /wp-admin/edit.php2.89 ▼0.4721.29 ▼31.12
Add New Post /wp-admin/post-new.php2.89 ▼3.0020.60 ▼76.69
Media Library /wp-admin/upload.php2.89 ▼0.3417.98 ▼19.61

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Universo Widget and Mobile Redirect: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲6014.79 ▲0.361.72 ▼0.4642.90 ▲1.92
Dashboard /wp-admin2,226 ▲264.85 ▼1.04110.85 ▲10.2739.12 ▼5.85
Posts /wp-admin/edit.php2,099 ▲22.01 ▲0.0039.98 ▲2.6134.34 ▼2.66
Add New Post /wp-admin/post-new.php1,542 ▲123.45 ▲5.25654.97 ▼24.2559.64 ▼1.37
Media Library /wp-admin/upload.php1,405 ▲54.23 ▼0.0796.34 ▼18.7446.28 ▼3.08

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
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/universo-widget-and-mobile-redirect/universo-widget-and-mobile-redirect.php+65
    Trying to access array offset on value of type bool
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for 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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/universo-widget-and-mobile-redirect/universo-widget-and-mobile-redirect.php:214

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Widget Form), #2 (Widget Sidebar in use), #3 (Universo Mobile App)
You can look at the official readme.txt

universo-widget-and-mobile-redirect/universo-widget-and-mobile-redirect.php 92% from 13 tests

The main PHP script in "Universo Widget and Mobile Redirect" version 2.4.1 is automatically included on every request by WordPress
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 171 characters long)

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
Success! There were no dangerous files found in this plugin316 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP23342233
PO File126063
CSS12020

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity3.75
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods375.00%
▷ Protected methods125.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
4 PNG files occupy 0.28MB with 0.16MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png26.64KB10.67KB▼ 59.96%
screenshot-1.png115.68KB42.01KB▼ 63.68%
screenshot-3.png140.74KB75.83KB▼ 46.12%
res/phone_icons.png5.01KB2.22KB▼ 55.64%