84% vishwa-301-redirects

Code Review | Vishwa 301 Redirects

WordPress plugin Vishwa 301 Redirects scored84%from 54 tests.

About plugin

  • Plugin page: vishwa-301-redirects
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.9
  • WordPress version: 6.3.1
  • First release: Mar 12, 2018
  • Latest release: Mar 12, 2018
  • Number of updates: 4
  • Update frequency: every 4.3 days
  • Top authors: vishwainfoways (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /694 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

A check of server-side resources used by Vishwa 301 Redirects
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0247.58 ▲1.32
Dashboard /wp-admin3.37 ▲0.0351.45 ▼5.61
Posts /wp-admin/edit.php3.49 ▲0.0948.12 ▼0.05
Add New Post /wp-admin/post-new.php5.95 ▲0.0386.90 ▼11.71
Media Library /wp-admin/upload.php3.30 ▲0.0339.00 ▲4.22
vishwa 301 Redirects /wp-admin/options-general.php?page=vishwa_301options3.2634.08

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Vishwa 301 Redirects
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.28 ▼0.292.00 ▼0.1741.28 ▼1.14
Dashboard /wp-admin2,202 ▲285.64 ▲0.0493.90 ▲3.4941.04 ▲0.71
Posts /wp-admin/edit.php2,101 ▲11.95 ▼0.0734.83 ▼3.6533.35 ▼3.78
Add New Post /wp-admin/post-new.php1,529 ▲323.22 ▼0.09674.54 ▲30.9557.09 ▼2.56
Media Library /wp-admin/upload.php1,407 ▲44.16 ▼0.0098.50 ▼4.7444.78 ▲1.69
vishwa 301 Redirects /wp-admin/options-general.php?page=vishwa_301options8822.0429.0330.14

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
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • 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)
Even though everything seems fine, this is not 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
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/vishwa-301-redirects/wp-vishwa-301-redirects.php:269

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
4 plugin tags: 301, seo, url, redirect

vishwa-301-redirects/wp-vishwa-301-redirects.php 92% from 13 tests

The main PHP script in "Vishwa 301 Redirects" version 1.0.0 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("vishwa-301-redirects.php" instead of "wp-vishwa-301-redirects.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin147 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP14586147

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity23.00
▷ Minimum class complexity23.00
▷ Maximum class complexity23.00
Average method complexity4.14
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
No PNG images were found in this plugin