10% hide-unwanted-shortcodes

Code Review | Hide Unwanted Shortcodes

WordPress plugin Hide Unwanted Shortcodes scored10%from 54 tests.

About plugin

  • Plugin page: hide-unwanted-sho...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.3
  • WordPress version: 6.3.1
  • First release: Jun 2, 2011
  • Latest release: Nov 30, 2016
  • Number of updates: 19
  • Update frequency: every 105.7 days
  • Top authors: denzel_chia (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /6,054 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > Parse error in wp-content/plugins/hide-unwanted-shortcodes/hide-unwanted-shortcodes.php+113
    syntax error, unexpected end of file

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

Server-side resources used by Hide Unwanted Shortcodes
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0048.26 ▲5.43
Dashboard /wp-admin3.31 ▲0.0045.96 ▼12.90
Posts /wp-admin/edit.php3.36 ▲0.0047.30 ▼2.61
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.50 ▼9.68
Media Library /wp-admin/upload.php3.23 ▲0.0033.92 ▼3.09

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Hide Unwanted Shortcodes
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4314.48 ▲0.101.80 ▼0.4046.43 ▲2.33
Dashboard /wp-admin2,206 ▲185.83 ▲0.92100.97 ▼13.6940.55 ▼0.91
Posts /wp-admin/edit.php2,089 ▼32.01 ▲0.0038.63 ▲2.2235.28 ▲0.58
Add New Post /wp-admin/post-new.php1,533 ▼023.14 ▼0.41686.22 ▲9.8359.38 ▼5.08
Media Library /wp-admin/upload.php1,388 ▼04.13 ▼0.0696.42 ▼11.2342.94 ▼1.60

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • 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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Parse error
      syntax error, unexpected end of file in wp-content/plugins/hide-unwanted-shortcodes/hide-unwanted-shortcodes.php on line 113

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (Plugin Settings Page) image not found
You can look at the official readme.txt

hide-unwanted-shortcodes/hide-unwanted-shortcodes.php 92% from 13 tests

The primary PHP file in "Hide Unwanted Shortcodes" version 1.1 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 167 characters long)

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
No dangerous file extensions were detected77 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1162077

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png38.70KB19.44KB▼ 49.76%