89% hide-anything

Code Review | Hide Anything - Hide Any Element on Any Page Visually

WordPress plugin Hide Anything - Hide Any Element on Any Page Visually scored89%from 54 tests.

About plugin

  • Plugin page: hide-anything
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1
  • WordPress version: 6.3.1
  • First release: Apr 2, 2021
  • Latest release: Feb 2, 2023
  • Number of updates: 4
  • Update frequency: every 167.8 days
  • Top authors: princeahmed (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

600+ active /3,650 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.09MB] [CPU: ▼3.67ms] Passed 4 tests

A check of server-side resources used by Hide Anything - Hide Any Element on Any Page Visually
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1041.64 ▼3.39
Dashboard /wp-admin3.38 ▲0.0851.04 ▲1.10
Posts /wp-admin/edit.php3.50 ▲0.1449.84 ▲0.23
Add New Post /wp-admin/post-new.php5.98 ▲0.1087.15 ▼11.93
Media Library /wp-admin/upload.php3.31 ▲0.0836.39 ▲0.43
Hide Anything /wp-admin/options-general.php?page=hide-anything-settings3.2833.25

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 23 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
hide_anything_version
db_upgraded
can_compress_scripts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Hide Anything - Hide Any Element on Any Page Visually: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,071 ▲32519.87 ▲5.4432.16 ▲30.3239.65 ▼6.18
Dashboard /wp-admin2,255 ▲816.80 ▲0.96114.53 ▲11.5037.39 ▼7.45
Posts /wp-admin/edit.php2,171 ▲796.41 ▲4.3756.93 ▲15.3032.19 ▼5.47
Add New Post /wp-admin/post-new.php1,525 ▼823.43 ▲0.21514.65 ▼63.4135.09 ▼23.00
Media Library /wp-admin/upload.php1,525 ▲1408.67 ▲4.50114.69 ▲16.7441.42 ▼1.07
Hide Anything /wp-admin/options-general.php?page=hide-anything-settings9766.4358.3835.15

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-comments
    • hide_anything_version
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP Passed 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
Congratulations! This plugin passed the SRP test

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 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: remove, hide, element, design

hide-anything/plugin.php 92% from 13 tests

The main PHP file in "Hide Anything - Hide Any Element on Any Page Visually" ver. 1.0.2 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("hide-anything.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin433 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP918390429
CSS2002
JavaScript2002

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity6.12
▷ Minimum class complexity3.00
▷ Maximum class complexity9.00
Average method complexity2.14
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes112.50%
Methods36
▷ Static methods925.00%
▷ Public methods3494.44%
▷ Protected methods00.00%
▷ Private methods25.56%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
7 PNG files occupy 0.08MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/products/upload-fields-for-wpforms.png10.08KB4.49KB▼ 55.49%
assets/images/products/dracula-dark-mode.png12.43KB7.74KB▼ 37.70%
assets/images/products/reader-mode.png2.79KB1.39KB▼ 50.14%
assets/images/products/integrate-google-drive.png8.30KB3.59KB▼ 56.74%
(invalid) assets/images/products/podcast-box.png15.05KB0.00KB▼ 100.00%