68% zone-redirect

Code Review | Zone Redirect

WordPress plugin Zone Redirect scored 68% from 54 tests.

About plugin

  • Plugin page: zone-redirect
  • Plugin version: 1.0.10
  • PHP version: 7.4.16
  • WordPress version: 5.8.1
  • First release: Jun 16, 2020
  • Latest release: Jan 14, 2021
  • Number of updates: 10
  • Update frequency: every 21.2 days
  • Top authors: zekinah (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 295 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by Zone Redirect
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.98 ▲0.2631.51 ▲7.44
Dashboard /wp-admin3.27 ▲0.2144.91 ▼1.02
Posts /wp-admin/edit.php3.32 ▲0.2140.94 ▼2.72
Add New Post /wp-admin/post-new.php5.56 ▲0.1381.65 ▼570.47
Media Library /wp-admin/upload.php3.15 ▲0.1435.85 ▲4.62

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 41 new files
Database: 2 new tables, 1 new option
New tables
wp_zn_redirect_visits
wp_zn_redirect_links
New WordPress options
zone_redirect_version

Browser metrics Passed 4 tests

A check of browser resources used by Zone Redirect
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,722 ▲12616.02 ▲0.419.27 ▼2.3848.08 ▲0.99
Dashboard /wp-admin3,012 ▲816.19 ▲0.27139.05 ▼6.55109.67 ▼8.01
Posts /wp-admin/edit.php2,759 ▲202.70 ▼0.0161.15 ▼7.19102.20 ▲9.62
Add New Post /wp-admin/post-new.php1,685 ▲18718.84 ▲0.01366.34 ▲1.75113.63 ▲6.09
Media Library /wp-admin/upload.php1,830 ▲235.05 ▲0.03152.41 ▲5.10122.01 ▲1.14

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie tables were found after uninstall: 1 table
    • wp_zn_redirect_links
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • zone_redirect_version

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/zone-redirect/admin/view/tabs/tab-history.php
    • > /wp-content/plugins/zone-redirect/admin/view/tabs/tab-home.php
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/zone-redirect/admin/view/tabs/tab-redirect.php:33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/zone-redirect/admin/view/tabs/tab-setup.php:31
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/zone-redirect/admin/view/zone-redirect-main-display.php:19
    • > PHP Notice
      Undefined variable: tbl_visits in wp-content/plugins/zone-redirect/admin/view/tabs/tab-history.php on line 29
    • > PHP Notice
      Undefined variable: tbl_visits in wp-content/plugins/zone-redirect/admin/view/tabs/tab-history.php on line 29

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Requires at least: Version format is invalid
  • Requires php: Version format is invalid
Please take inspiration from this readme.txt

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

The main PHP script in "Zone Redirect" version 1.0.10 is automatically included on every request by WordPress
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 202 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected23,893 lines of code in 34 files:
LanguageFilesBlank linesComment linesLines of code
CSS61,5585412,588
JavaScript72,4037,08610,229
PHP201766061,057
JSON10019

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity6.64
▷ Minimum class complexity1.00
▷ Maximum class complexity24.00
Average method complexity2.09
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods57
▷ Static methods23.51%
▷ Public methods5291.23%
▷ Protected methods00.00%
▷ Private methods58.77%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin