78% mobile-redirect-with-slug

Code Review | Mobile Redirect With Slug

WordPress plugin Mobile Redirect With Slug scored78%from 54 tests.

About plugin

  • Plugin page: mobile-redirect-w...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.4.2
  • WordPress version: 6.3.1
  • First release: Aug 16, 2016
  • Latest release: Aug 4, 2020
  • Number of updates: 10
  • Update frequency: every 144.9 days
  • Top authors: jojoee (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /2,224 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼1.24ms] Passed 4 tests

Analyzing server-side resources used by Mobile Redirect With Slug
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0837.61 ▲0.21
Dashboard /wp-admin3.39 ▲0.0947.11 ▼6.34
Posts /wp-admin/edit.php3.51 ▲0.1550.53 ▼0.72
Add New Post /wp-admin/post-new.php5.97 ▲0.0891.80 ▲4.58
Media Library /wp-admin/upload.php3.32 ▲0.0834.99 ▲1.91
Mobile Redirect /wp-admin/options-general.php?page=mobile-redirect-with-slug3.2832.49

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Mobile Redirect With Slug
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲8313.31 ▼1.075.19 ▲3.6140.13 ▲2.45
Dashboard /wp-admin2,210 ▲194.88 ▼0.2097.53 ▼4.0739.25 ▼6.75
Posts /wp-admin/edit.php2,093 ▲42.03 ▼0.1540.08 ▼0.6649.35 ▲10.51
Add New Post /wp-admin/post-new.php1,536 ▲1723.18 ▼0.25643.55 ▲11.7056.75 ▲3.82
Media Library /wp-admin/upload.php1,392 ▲104.18 ▲0.0296.31 ▼5.3040.83 ▼3.25
Mobile Redirect /wp-admin/options-general.php?page=mobile-redirect-with-slug8132.0324.1630.78

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/mobile-redirect-with-slug/admin/partials/mrws-admin-display.php
    • > /wp-content/plugins/mobile-redirect-with-slug/public/partials/mrws-public-display.php
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/mobile-redirect-with-slug/mobile-redirect-with-slug.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'MRWS_Common' not found in wp-content/plugins/mobile-redirect-with-slug/admin/class-mrws-admin.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'MRWS_Common' not found in wp-content/plugins/mobile-redirect-with-slug/public/class-mrws-public.php:23

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)
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (Example 1 (screenshot-1.jpg)), #2 (Example 2 (screenshot-2.jpg))
  • Donate link: Invalid URI found ("")
You can look at the official readme.txt

mobile-redirect-with-slug/mobile-redirect-with-slug.php 92% from 13 tests

The principal PHP file in "Mobile Redirect With Slug" v. 1.0.1 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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
Everything looks great! No dangerous files found in this plugin520 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP13157649476
JSON10023
JavaScript375421
CSS2080

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity4.00
▷ Minimum class complexity1.00
▷ Maximum class complexity9.00
Average method complexity1.51
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods47
▷ Static methods24.26%
▷ Public methods3063.83%
▷ Protected methods1123.40%
▷ Private methods612.77%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG images were found in this plugin