83% gs-gomobi-redirector

Code Review | GS GoMobi Redirector

WordPress plugin GS GoMobi Redirector scored83%from 54 tests.

About plugin

  • Plugin page: gs-gomobi-redirector
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: Dec 30, 2012
  • Latest release: Feb 6, 2013
  • Number of updates: 13
  • Update frequency: every 2.9 days
  • Top authors: geekstuff (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,628 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼8.43ms] Passed 4 tests

An overview of server-side resources used by GS GoMobi Redirector
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0636.05 ▼16.64
Dashboard /wp-admin3.36 ▲0.0647.41 ▲3.26
Posts /wp-admin/edit.php3.41 ▲0.0548.13 ▼3.06
Add New Post /wp-admin/post-new.php5.94 ▲0.0583.15 ▼15.96
Media Library /wp-admin/upload.php3.29 ▲0.0533.92 ▲1.95
GS GoMobi Redirector /wp-admin/options-general.php?page=my-plugin3.2434.92

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
gsgmr-rootonly
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by GS GoMobi Redirector
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4714.48 ▲0.181.61 ▼0.5537.56 ▼12.33
Dashboard /wp-admin2,210 ▲254.84 ▼0.08106.78 ▲0.5841.89 ▼0.34
Posts /wp-admin/edit.php2,093 ▲41.99 ▼0.0439.64 ▼1.0935.56 ▲0.28
Add New Post /wp-admin/post-new.php1,540 ▲723.29 ▼0.16611.99 ▲9.4951.56 ▲1.58
Media Library /wp-admin/upload.php1,386 ▲14.19 ▼0.0197.71 ▼4.4742.30 ▼2.38
GS GoMobi Redirector /wp-admin/options-general.php?page=my-plugin8912.0224.0428.29

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • gsgmr-rootonly

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× 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/gs-gomobi-redirector/index.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === gs-gomobi-redirector === )
  • Screenshots: These screenshots do not have images: #1 (Settings are accessed via the Wordpress Settings menu option gsgmr-screenshot0.png), #2 (Easily modify URL of your goMobi website gsgmr-screenshot3.png)
Please take inspiration from this readme.txt

gs-gomobi-redirector/index.php 85% from 13 tests

"GS GoMobi Redirector" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("gs-gomobi-redirector.php" instead of "index.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 393 characters long)

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
Success! There were no dangerous files found in this plugin210 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP14318210

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
3 PNG files occupy 0.14MB with 0.09MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/gsgmr-screenshot0.png26.90KB9.36KB▼ 65.21%
assets/gsgmr-screenshot3.png55.88KB21.36KB▼ 61.78%
assets/gsgmr-screenshot1.png57.36KB20.69KB▼ 63.94%