94% simple-mobile-url-redirect

Code Review | Simple Mobile URL Redirect

WordPress plugin Simple Mobile URL Redirect scored 94% from 54 tests.

About plugin

  • Plugin page: simple-mobile-url...
  • Plugin version: 1.7.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.5
  • WordPress version: 5.9.2
  • First release: Apr 16, 2012
  • Latest release: Aug 4, 2020
  • Number of updates: 72
  • Update frequency: every 42.2 days
  • Top authors: insideoutweb (90.28%)trepmal (11.11%)

Code review

54 tests

User reviews

29 reviews

Install metrics

5,000+ active / 126,768 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼304.31ms] Passed 4 tests

An overview of server-side resources used by Simple Mobile URL Redirect
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.24 ▲0.0459.91 ▲2.76
Dashboard /wp-admin4.07 ▲0.0437.90 ▼7.84
Posts /wp-admin/edit.php4.36 ▲0.0441.02 ▼13.93
Add New Post /wp-admin/post-new.php7.60 ▲0.0195.90 ▼1,189.33
Media Library /wp-admin/upload.php4.01 ▲0.0327.45 ▼6.15
Mobile Redirect /wp-admin/options-general.php?page=simple-mobile-url-redirect/mobile-redirect.php3.9828.93

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Simple Mobile URL Redirect
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,800 ▲7815.80 ▼0.275.96 ▼0.182.59 ▲0.26
Dashboard /wp-admin2,897 ▲376.12 ▼0.02120.67 ▼6.02204.27 ▲39.47
Posts /wp-admin/edit.php2,690 ▼13.24 ▲0.0065.81 ▲0.28150.28 ▲2.96
Add New Post /wp-admin/post-new.php1,663 ▼2721.86 ▲0.97437.32 ▼51.36213.06 ▲49.52
Media Library /wp-admin/upload.php1,700 ▲25.53 ▲0.01147.00 ▼1.48241.03 ▲50.01
Mobile Redirect /wp-admin/options-general.php?page=simple-mobile-url-redirect/mobile-redirect.php1,1362.3757.25110.74

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstall script ran successfully

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 | 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 items
  • 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/simple-mobile-url-redirect/mobile-redirect.php:40

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Donate link: Invalid URI found ("")
Please take inspiration from this readme.txt

simple-mobile-url-redirect/mobile-redirect.php 92% from 13 tests

"Simple Mobile URL Redirect" version 1.7.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("simple-mobile-url-redirect.php" instead of "mobile-redirect.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected107 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12525107

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin