77% jonimo-simple-redirect

Code Review | jonimo Simple Redirect

WordPress plugin jonimo Simple Redirect scored77%from 54 tests.

About plugin

  • Plugin page: jonimo-simple-red...
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.9
  • WordPress version: 6.3.1
  • First release: Dec 8, 2013
  • Latest release: Apr 21, 2014
  • Number of updates: 52
  • Update frequency: every 2.6 days
  • Top authors: jonimo (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

100+ active /8,245 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.21MB] [CPU: ▼7.44ms] Passed 4 tests

Analyzing server-side resources used by jonimo Simple Redirect
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.2036.85 ▼5.40
Dashboard /wp-admin3.53 ▲0.1845.90 ▼15.21
Posts /wp-admin/edit.php3.64 ▲0.2943.78 ▼3.56
Add New Post /wp-admin/post-new.php6.11 ▲0.2283.65 ▼5.60
Media Library /wp-admin/upload.php3.45 ▲0.2233.98 ▲2.18
About /wp-admin/admin.php?page=about3.3931.88
Logout /wp-admin/admin.php?page=logout3.3931.21
Default Link /wp-admin/admin.php?page=default3.3932.82
Login /wp-admin/admin.php?page=jonimo3.4639.41

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for jonimo Simple Redirect
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,838 ▲6713.58 ▼0.841.69 ▼0.2642.25 ▲0.12
Dashboard /wp-admin2,247 ▲625.87 ▲1.0097.14 ▼19.4285.12 ▲37.76
Posts /wp-admin/edit.php2,130 ▲412.03 ▲0.0236.17 ▼0.3434.51 ▲0.45
Add New Post /wp-admin/post-new.php1,551 ▲1823.21 ▲0.16702.17 ▲51.8459.99 ▲8.42
Media Library /wp-admin/upload.php1,426 ▲444.21 ▲0.07115.23 ▲17.2044.80 ▲3.14
About /wp-admin/admin.php?page=about8902.0727.8530.27
Logout /wp-admin/admin.php?page=logout9061.7124.4329.30
Default Link /wp-admin/admin.php?page=default9051.8523.8931.60
Login /wp-admin/admin.php?page=jonimo1,0861.8027.4041.07

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=about
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/admin.php?page=about
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=default
    • > Notice in wp-content/plugins/jonimo-simple-redirect/class/redirect-default.php+175
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 8× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/jonimo-simple-redirect/ji_core_setup.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/jonimo-simple-redirect/class/redirect-core.php:70
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/jonimo-simple-redirect/addons/redirect-login-limit-addon.php:35
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/jonimo-simple-redirect/class/redirect-default.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/jonimo-simple-redirect/class/redirect-logout.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/jonimo-simple-redirect/class/redirect-login.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/jonimo-simple-redirect/addons/redirect-woocommerce-addon.php:78
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/jonimo-simple-redirect/addons/redirect-default-addon.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === jonimo-simple-redirect === )
  • Tags: Please reduce the number of tags, currently 23 tag instead of maximum 10
  • Screenshots: These screenshots do not have images: #1 (On the login options screen you can choose where to redirect different users based on their role.), #2 (On the Default options screen you can set a location to redirect to if no custom location is set.), #3 (On the logout options screen you can direct all users to a common location.)
You can take inspiration from this readme.txt

jonimo-simple-redirect/ji_core_setup.php 92% from 13 tests

The entry point to "jonimo Simple Redirect" version 1.5 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("jonimo-simple-redirect.php" instead of "ji_core_setup.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin1,498 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP101714691,142
JavaScript3255185
CSS1301171

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
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%
Functions50
▷ Named functions50100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
11 PNG files occupy 0.20MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
banner-772x250.png33.53KB11.71KB▼ 65.06%
assets/images/twitter_29.png1.01KB0.70KB▼ 30.07%
banner-772x250.png.png78.76KB28.29KB▼ 64.08%
assets/screenshot-2.png11.87KB7.95KB▼ 33.05%
screenshot-2.png15.39KB9.43KB▼ 38.71%