83% mg-redirect

Code Review | Moodgiver Redirect

WordPress plugin Moodgiver Redirect scored83%from 54 tests.

About plugin

  • Plugin page: mg-redirect
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.3
  • WordPress version: 6.3.1
  • First release: Sep 22, 2015
  • Latest release: Sep 22, 2015
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: swinaallen (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,042 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼8.46ms] Passed 4 tests

Server-side resources used by Moodgiver Redirect
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.97 ▼11.10
Dashboard /wp-admin3.31 ▲0.0148.97 ▼3.38
Posts /wp-admin/edit.php3.36 ▲0.0046.96 ▼6.12
Add New Post /wp-admin/post-new.php5.89 ▲0.0095.47 ▼13.25
Media Library /wp-admin/upload.php3.23 ▲0.0036.08 ▼1.05
mg Redirect /wp-admin/options-general.php?page=my-unique-identifier3.2031.52

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Moodgiver Redirect
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲8314.46 ▲0.091.97 ▲0.1641.58 ▼3.35
Dashboard /wp-admin2,210 ▲255.90 ▲0.0597.44 ▼7.3041.12 ▼3.38
Posts /wp-admin/edit.php2,093 ▲41.99 ▼0.0136.46 ▼5.3233.35 ▼7.82
Add New Post /wp-admin/post-new.php1,536 ▼122.99 ▼0.26667.53 ▼3.2354.88 ▲0.68
Media Library /wp-admin/upload.php1,392 ▲14.22 ▲0.0696.25 ▼5.3045.79 ▲1.05
mg Redirect /wp-admin/options-general.php?page=my-unique-identifier8132.0122.9232.78

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
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/mg-redirect/mg-redirect.php

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 83% from 29 tests

readme.txt 75% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Contributors: Contributors not specified
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === mg-redirect === )
  • Contributors: No tags were detected
  • Donate link: Please fix this invalid URI: ""
Please take inspiration from this readme.txt

mg-redirect/mg-redirect.php 92% from 13 tests

The main PHP script in "Moodgiver Redirect" version 1.0.0 is automatically included on every request by WordPress
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 326 characters long)

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

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
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%
Functions3
▷ Named functions3100.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
PNG images were not found in this plugin