77% advanced-mobile-redirect

Code Review | Advanced Mobile Redirect

WordPress plugin Advanced Mobile Redirect scored 77% from 54 tests.

About plugin

  • Plugin page: advanced-mobile-r...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.2.2
  • WordPress version: 5.9.2
  • First release: Apr 16, 2015
  • Latest release: Jun 2, 2015
  • Number of updates: 22
  • Update frequency: every 2.5 days
  • Top authors: slimspots (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 3,344 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.31MB] [CPU: ▼326.35ms] Passed 4 tests

Server-side resources used by Advanced Mobile Redirect
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.05 ▲0.5369.38 ▲14.12
Dashboard /wp-admin3.75 ▲0.3440.11 ▼8.73
Posts /wp-admin/edit.php3.97 ▲0.3344.85 ▲2.96
Add New Post /wp-admin/post-new.php7.21 ▲0.24109.63 ▼1,301.29
Media Library /wp-admin/upload.php3.62 ▲0.3328.86 ▲1.68
Advanced Mobile Redirect /wp-admin/options-general.php?page=advanced-mobile-redirect/advanced-mobile-redirect.php3.5955.51

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, 1 new option
New WordPress options

Browser metrics Passed 4 tests

An overview of browser requirements for Advanced Mobile Redirect
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,777 ▲5515.69 ▲0.026.87 ▲0.822.11 ▼0.47
Dashboard /wp-admin2,883 ▲296.10 ▼0.05122.05 ▼20.89158.53 ▼10.92
Posts /wp-admin/edit.php2,693 ▲23.23 ▼0.0162.25 ▼2.37137.56 ▼38.16
Add New Post /wp-admin/post-new.php1,686 ▲2516.97 ▼0.07381.31 ▼21.62197.60 ▲41.44
Media Library /wp-admin/upload.php1,700 ▲55.53 ▲0.01145.53 ▲9.45184.93 ▼5.41
Advanced Mobile Redirect /wp-admin/options-general.php?page=advanced-mobile-redirect/advanced-mobile-redirect.php9,9242.5058.29166.42

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options were found after uninstall: 1 option
    • mobileredirecttoggle

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not 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 take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-mobile-redirect/advanced-mobile-redirect.php:79

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/options-general.php?page=advanced-mobile-redirect/advanced-mobile-redirect.php
    • > Network (severe)
    http://slimspots.org/adview.gif - Failed to load resource: net::ERR_NAME_NOT_RESOLVED


Plugin configuration 86% from 29 tests

readme.txt 75% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Screenshots: A description for screenshot #0 is required in advanced-mobile-redirect/assets to your readme.txt
  • Tags: There are too many tags (11 tag instead of maximum 10)
  • Screenshots: Add images for these screenshots: #2 (banner-772×250.png), #3 (icon-128x128.png), #4 (banner-1544×500.png)
  • Donate link: Please fix this invalid URI: ""
You can take inspiration from this readme.txt

advanced-mobile-redirect/advanced-mobile-redirect.php Passed 13 tests

Analyzing the main PHP file in "Advanced Mobile Redirect" version 1.2
52 characters long description:
Select a URL to redirect mobile users by device type

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
There were no executable files found in this plugin1,787 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity62.33
▷ Minimum class complexity1.00
▷ Maximum class complexity123.00
Average method complexity5.72
▷ Minimum method complexity1.00
▷ Maximum method complexity77.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
▷ Static methods923.08%
▷ Public methods3794.87%
▷ Protected methods25.13%
▷ Private methods00.00%
▷ Named functions32100.00%
▷ Anonymous functions00.00%
▷ Global constants4884.21%
▷ Class constants915.79%
▷ Public constants9100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.07MB with 0.04MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot1.png76.67KB35.18KB▼ 54.11%