84% wmf-mobile-redirector

Code Review | WMF Mobile Redirector

WordPress plugin WMF Mobile Redirector scored84%from 54 tests.

About plugin

  • Plugin page: wmf-mobile-redire...
  • Plugin version: 1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.4.1
  • WordPress version: 6.3.1
  • First release: Mar 7, 2016
  • Latest release: May 19, 2020
  • Number of updates: 50
  • Update frequency: every 48.8 days
  • Top authors: webbu (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

300+ active /5,073 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.17MB] [CPU: ▼5.84ms] Passed 4 tests

A check of server-side resources used by WMF Mobile Redirector
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1942.17 ▲6.47
Dashboard /wp-admin3.49 ▲0.1444.13 ▼11.79
Posts /wp-admin/edit.php3.60 ▲0.2444.76 ▼1.66
Add New Post /wp-admin/post-new.php6.07 ▲0.1888.20 ▼9.09
Media Library /wp-admin/upload.php3.41 ▲0.1835.43 ▼0.82
WMF Mobile Redirector /wp-admin/options-general.php?page=wmf-mobile-redirector/includes/options-page.php3.3730.80

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for WMF Mobile Redirector
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6013.18 ▼1.051.78 ▲0.0438.47 ▼1.23
Dashboard /wp-admin2,212 ▲244.88 ▼0.04108.87 ▼0.8941.42 ▼0.34
Posts /wp-admin/edit.php2,095 ▲62.06 ▲0.0340.54 ▲4.3536.18 ▲5.48
Add New Post /wp-admin/post-new.php1,533 ▲1923.22 ▲5.52658.78 ▼11.7151.55 ▼2.10
Media Library /wp-admin/upload.php1,456 ▲714.19 ▲0.0396.53 ▼1.4342.38 ▼4.06
WMF Mobile Redirector /wp-admin/options-general.php?page=wmf-mobile-redirector/includes/options-page.php8912.0325.1825.90

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wmf-mobile-redirector/includes/options-page.php:108
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/wmf-mobile-redirector/index.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: redirect, webbu, mobile, mobile redirect

wmf-mobile-redirector/index.php 92% from 13 tests

"WMF Mobile Redirector" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wmf-mobile-redirector.php" instead of "index.php")

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
Good job! No executable or dangerous file extensions detected904 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP3193659824
CSS1121280

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.84
Average class complexity134.00
▷ Minimum class complexity134.00
▷ Maximum class complexity134.00
Average method complexity4.69
▷ Minimum method complexity1.00
▷ Maximum method complexity77.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods36
▷ Static methods925.00%
▷ Public methods3391.67%
▷ Protected methods25.56%
▷ Private methods12.78%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants14
▷ Global constants535.71%
▷ Class constants964.29%
▷ Public constants9100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/switch.png6.00KB2.14KB▼ 64.37%