10% mobile-device-detect-reloaded

Code Review | Mobile Device Detect Reloaded

WordPress plugin Mobile Device Detect Reloaded scored10%from 54 tests.

About plugin

  • Plugin page: mobile-device-det...
  • Plugin version: 1.4.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-4.0
  • WordPress version: 6.3.1
  • First release: Sep 16, 2011
  • Latest release: Sep 8, 2014
  • Number of updates: 20
  • Update frequency: every 54.4 days
  • Top authors: desimon (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active /5,602 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/mobile-device-detect-reloaded/loadMobileDeviceDetectReloaded.php+349
    Undefined index: update_pluginoptions

Server metrics [RAM: ▼1.97MB] [CPU: ▼54.41ms] Passed 4 tests

Server-side resources used by Mobile Device Detect Reloaded
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.443.81 ▼35.84
Dashboard /wp-admin2.05 ▼1.305.27 ▼56.48
Posts /wp-admin/edit.php2.05 ▼1.316.66 ▼38.38
Add New Post /wp-admin/post-new.php2.05 ▼3.846.16 ▼86.93
Media Library /wp-admin/upload.php2.05 ▼1.186.25 ▼27.65

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Mobile Device Detect Reloaded
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲7013.62 ▼0.681.88 ▼0.0941.15 ▼3.66
Dashboard /wp-admin2,222 ▲345.90 ▲1.04110.30 ▼5.2444.58 ▼2.79
Posts /wp-admin/edit.php2,105 ▲191.99 ▼0.0035.23 ▼0.9734.60 ▼6.54
Add New Post /wp-admin/post-new.php1,546 ▲2523.09 ▼0.10644.12 ▼24.1150.58 ▼7.87
Media Library /wp-admin/upload.php1,404 ▲164.22 ▼0.0199.28 ▼0.4741.49 ▼3.44

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/mobile-device-detect-reloaded/loadMobileDeviceDetectReloaded.php+349
    Undefined index: update_pluginoptions
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not 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 fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mobile-device-detect-reloaded/loadMobileDeviceDetectReloaded.php:110

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 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: redirect, device, mobile, android, iphone...

mobile-device-detect-reloaded/loadMobileDeviceDetectReloaded.php 85% from 13 tests

The primary PHP file in "Mobile Device Detect Reloaded" version 1.4.1 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 845 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("mobile-device-detect-reloaded.php" instead of "loadMobileDeviceDetectReloaded.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected415 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP24837415

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.66
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.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
PNG images were not found in this plugin