84% hide-or-toggle

Code Review | Hide Or Toggle

WordPress plugin Hide Or Toggle scored84%from 54 tests.

About plugin

  • Plugin page: hide-or-toggle
  • Plugin version: 0.1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.1-6.1.1
  • WordPress version: 6.3.1
  • First release: Feb 14, 2023
  • Latest release: Feb 14, 2023
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: capbussat (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /134 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼3.22ms] Passed 4 tests

Analyzing server-side resources used by Hide Or Toggle
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0638.38 ▼3.07
Dashboard /wp-admin3.34 ▲0.0448.21 ▼5.04
Posts /wp-admin/edit.php3.39 ▲0.0352.64 ▲4.84
Add New Post /wp-admin/post-new.php5.94 ▲0.0594.48 ▼9.60
Media Library /wp-admin/upload.php3.26 ▲0.0342.44 ▲6.30

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

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

Browser metrics Passed 4 tests

Hide Or Toggle: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,890 ▲14413.97 ▼0.395.68 ▲3.7339.79 ▼4.15
Dashboard /wp-admin2,203 ▲124.83 ▼0.25112.52 ▲9.9839.50 ▲0.01
Posts /wp-admin/edit.php2,092 ▲32.05 ▲0.0341.45 ▲3.8737.01 ▲2.87
Add New Post /wp-admin/post-new.php6,368 ▲4,84928.15 ▲5.02864.73 ▲184.3037.07 ▼16.11
Media Library /wp-admin/upload.php1,385 ▼34.25 ▼0.0298.67 ▼4.6041.75 ▼4.05

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
  • 1× 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/hide-or-toggle/hide-or-toggle.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention: You can look at the official readme.txt

hide-or-toggle/hide-or-toggle.php 92% from 13 tests

"Hide Or Toggle" version 0.1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Requires at least: Required version must match the one declared in readme.txt ("5.9" instead of "6.1")

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
Success! There were no dangerous files found in this plugin1,238 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript4173332889
JSON300188
CSS61857144
PHP451417

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin