79% language-redirect

Code Review | Language Redirect

WordPress plugin Language Redirect scored 79% from 54 tests.

About plugin

  • Plugin page: language-redirect
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.7.2
  • WordPress version: 6.3.1
  • First release: Sep 18, 2013
  • Latest release: Feb 11, 2017
  • Number of updates: 19
  • Update frequency: every 65.4 days
  • Top authors: bjoerne (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

200+ active / 11,872 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.00ms] Passed 4 tests

This is a short check of server-side resources used by Language Redirect
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.26 ▼6.90
Dashboard /wp-admin3.31 ▲0.0147.05 ▼0.16
Posts /wp-admin/edit.php3.36 ▲0.0145.93 ▼1.01
Add New Post /wp-admin/post-new.php5.89 ▲0.0090.29 ▲0.09
Media Library /wp-admin/upload.php3.23 ▲0.0134.93 ▲2.23

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Language Redirect
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲7214.48 ▼0.211.94 ▼0.3244.83 ▼6.15
Dashboard /wp-admin2,210 ▲224.86 ▼0.9997.76 ▼9.6840.27 ▼5.23
Posts /wp-admin/edit.php2,090 ▲12.01 ▼0.0339.26 ▲1.4834.27 ▼4.49
Add New Post /wp-admin/post-new.php1,537 ▼523.47 ▲5.02611.26 ▲11.2549.21 ▼4.52
Media Library /wp-admin/upload.php1,389 ▲14.18 ▲0.0398.32 ▼1.6443.98 ▲0.84
Language Redirect /wp-admin/language-redirect.php260.440.0915.82

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please 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 is_admin() in wp-content/plugins/language-redirect/language-redirect.php:13

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please take a look at the following user-side issues
    • > GET request to /wp-admin/language-redirect.php
    • > Network (severe)
    wp-admin/language-redirect.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: multisite, redirect, header, language

language-redirect/language-redirect.php Passed 13 tests

"Language Redirect" version 1.0.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
88 characters long description:
Redirects from the root site of a multisite project to a language specific network site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin139 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP41514139

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.45
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected