99% wpstudio-mobile-redirect

Code Review | Genesis Mobile Redirect

WordPress plugin Genesis Mobile Redirect scored 99% from 54 tests.

About plugin

  • Plugin page: wpstudio-mobile-r...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-5.2.2
  • WordPress version: 5.9.2
  • First release: Apr 13, 2016
  • Latest release: Jun 20, 2019
  • Number of updates: 10
  • Update frequency: every 116.3 days
  • Top authors: frankschrijvers (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active / 9,132 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

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

This is a short check of server-side resources used by Genesis Mobile Redirect
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▼0.0550.38 ▼4.86
Dashboard /wp-admin3.41 ▲0.0145.36 ▲12.31
Posts /wp-admin/edit.php3.65 ▲0.0135.28 ▼3.89
Add New Post /wp-admin/post-new.php6.88 ▼0.0991.65 ▼1,163.23
Media Library /wp-admin/upload.php3.30 ▲0.0032.31 ▼5.45

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Genesis Mobile Redirect
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,289 ▼46516.17 ▲0.614.65 ▼1.6132.32 ▲29.82
Dashboard /wp-admin2,892 ▲386.14 ▲0.00120.57 ▼20.13173.69 ▼38.94
Posts /wp-admin/edit.php2,670 ▼183.26 ▲0.02110.05 ▲36.94160.73 ▲14.00
Add New Post /wp-admin/post-new.php1,690 ▼2120.10 ▼1.19429.94 ▲11.91159.22 ▼73.27
Media Library /wp-admin/upload.php1,698 ▲35.49 ▲0.03155.11 ▲6.40192.70 ▲3.27

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstaller ran successfully

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Screenshots: Screenshot #1 (Genesis Mobile Redirect admin panel) image missing
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
Please take inspiration from this readme.txt

wpstudio-mobile-redirect/genesis-mobile-redirect.php 92% from 13 tests

This is the main PHP file of "Genesis Mobile Redirect" version 1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wpstudio-mobile-redirect.php" instead of "genesis-mobile-redirect.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected196 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP34276160
JavaScript121636

PHP code Passed 2 tests

This is a short overview 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.14
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.20
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png35.90KB12.50KB▼ 65.18%