79% multi-mobile-redirect

Code Review | Multi Mobile Redirect

WordPress plugin Multi Mobile Redirect scored79%from 54 tests.

About plugin

  • Plugin page: multi-mobile-redi...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.7.4
  • WordPress version: 6.3.1
  • First release: May 7, 2017
  • Latest release: May 7, 2017
  • Number of updates: 6
  • Update frequency: every 0.2 days
  • Top authors: levadmin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,262 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.16MB] [CPU: ▼3.44ms] Passed 4 tests

Server-side resources used by Multi Mobile Redirect
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1844.68 ▲7.01
Dashboard /wp-admin3.48 ▲0.1347.97 ▼11.84
Posts /wp-admin/edit.php3.59 ▲0.2349.10 ▲1.92
Add New Post /wp-admin/post-new.php6.06 ▲0.1790.16 ▼5.63
Media Library /wp-admin/upload.php3.40 ▲0.1735.74 ▲1.78
Mobile Redirect /wp-admin/options-general.php?page=mobile-redirect3.3729.52

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Multi Mobile Redirect: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6914.48 ▲0.101.78 ▼0.0842.52 ▲1.44
Dashboard /wp-admin2,207 ▲224.85 ▼1.01111.36 ▼2.8541.11 ▲2.70
Posts /wp-admin/edit.php2,093 ▲42.00 ▼0.0440.16 ▼0.2734.44 ▼0.76
Add New Post /wp-admin/post-new.php1,542 ▲2823.53 ▲6.03662.50 ▼6.0973.82 ▲21.36
Media Library /wp-admin/upload.php1,392 ▲14.17 ▼0.0395.79 ▼3.2842.21 ▼0.62
Mobile Redirect /wp-admin/options-general.php?page=mobile-redirect8851.8726.7058.32

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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 items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/multi-mobile-redirect/includes/page.php
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      count(): Parameter must be an array or an object that implements Countable in wp-content/plugins/multi-mobile-redirect/includes/page.php on line 16
    • > PHP Warning
      count(): Parameter must be an array or an object that implements Countable in wp-content/plugins/multi-mobile-redirect/includes/page.php on line 65
    • > PHP Notice
      Undefined variable: options in wp-content/plugins/multi-mobile-redirect/includes/page.php on line 16
    • > PHP Notice
      Undefined variable: options in wp-content/plugins/multi-mobile-redirect/includes/page.php on line 65
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/multi-mobile-redirect/multi-mobile-redirect.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
2 plugin tags: multi mobile redirect, mobile redirect

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

The principal PHP file in "Multi Mobile Redirect" v. 1.0 is loaded by WordPress automatically on each request
51 characters long description:
Simple redirect to handle redirect for mobile pages

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected3,889 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
SVG2002,959
PHP3170652814
JavaScript36884
CSS532432

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.86
Average class complexity73.00
▷ Minimum class complexity12.00
▷ Maximum class complexity134.00
Average method complexity4.36
▷ Minimum method complexity1.00
▷ Maximum method complexity77.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods44
▷ Static methods920.45%
▷ Public methods4295.45%
▷ Protected methods24.55%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants9
▷ Global constants00.00%
▷ Class constants9100.00%
▷ Public constants9100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected