72% rabbit-hole

Code Review | Rabbit Hole

WordPress plugin Rabbit Hole scored72%from 54 tests.

About plugin

  • Plugin page: rabbit-hole
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.4
  • WordPress version: 6.3.1
  • First release: Jul 29, 2022
  • Latest release: Nov 8, 2023
  • Number of updates: 3
  • Update frequency: every 156.0 days
  • Top authors: nerdsfarm (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /244 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 successfully, without throwing any errors or notices

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

Analyzing server-side resources used by Rabbit Hole
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0033.35 ▼4.15
Dashboard /wp-admin3.32 ▼0.0343.76 ▼23.87
Posts /wp-admin/edit.php3.37 ▲0.0147.05 ▼0.99
Add New Post /wp-admin/post-new.php5.90 ▲0.0183.75 ▼8.26
Media Library /wp-admin/upload.php3.24 ▲0.0133.63 ▼3.04
Rabbit Hole /wp-admin/options-general.php?page=rabbit_hole3.2128.14

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Rabbit Hole
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲2214.34 ▲0.071.60 ▼0.3040.49 ▲0.52
Dashboard /wp-admin2,199 ▲225.60 ▼0.0294.45 ▼5.2642.32 ▼0.84
Posts /wp-admin/edit.php2,104 ▲11.96 ▲0.0240.13 ▲5.2235.59 ▲2.84
Add New Post /wp-admin/post-new.php1,529 ▲323.32 ▲0.18688.16 ▼6.7757.43 ▲2.30
Media Library /wp-admin/upload.php1,401 ▲14.09 ▼0.12101.22 ▼9.5840.41 ▼6.53
Rabbit Hole /wp-admin/options-general.php?page=rabbit_hole3,9161.8435.1838.81

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • rabbit_hole
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/rabbit-hole/rabbit-hole.php
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rabbit-hole/functions/frontend.php:197
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rabbit-hole/functions/admin.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rabbit-hole/functions/metabox.php:54

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There are user-side issues you should fix
    • > GET request to /wp-admin/options-general.php?page=rabbit_hole
    • > Network (severe)
    wp-content/plugins/rabbit-hole/assets/img/icon.svg - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
7 plugin tags: cpt, allow, redirect, deny, 404...

rabbit-hole/rabbit-hole.php 92% from 13 tests

The main PHP script in "Rabbit Hole" version 1.1 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected678 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP59281580
CSS16060
JavaScript14038

PHP code Passed 2 tests

Analyzing 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.55
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%
Functions23
▷ Named functions2295.65%
▷ Anonymous functions14.35%
Constants3
▷ Global constants3100.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
PNG images were not found in this plugin