79% hide-broken-shortcodes

Code Review | Hide Broken Shortcodes

WordPress plugin Hide Broken Shortcodes scored 79% from 54 tests.

About plugin

  • Plugin page: hide-broken-short...
  • Plugin version: 1.9.4
  • PHP version: 7.4.16
  • WordPress compatibility: 2.5-5.8
  • WordPress version: 6.3.1
  • First release: Jan 5, 2010
  • Latest release: Oct 10, 2021
  • Number of updates: 24
  • Update frequency: every 188.3 days
  • Top authors: coffee2code (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

800+ active / 22,699 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▲0.78ms] Passed 4 tests

A check of server-side resources used by Hide Broken Shortcodes
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0243.55 ▼3.06
Dashboard /wp-admin3.32 ▲0.0266.44 ▲8.82
Posts /wp-admin/edit.php3.37 ▲0.0251.09 ▲1.39
Add New Post /wp-admin/post-new.php5.90 ▲0.0295.57 ▲5.01
Media Library /wp-admin/upload.php3.24 ▲0.0237.93 ▼0.22

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Hide Broken Shortcodes
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲1113.57 ▼0.085.31 ▲3.2745.21 ▼2.90
Dashboard /wp-admin2,206 ▼04.86 ▼0.98113.80 ▲1.4641.86 ▼2.21
Posts /wp-admin/edit.php2,089 ▼02.01 ▲0.0234.66 ▼4.6036.02 ▲0.55
Add New Post /wp-admin/post-new.php1,533 ▲1323.36 ▲0.16637.68 ▼46.0957.39 ▼3.65
Media Library /wp-admin/upload.php1,382 ▼64.25 ▲0.0196.71 ▼8.0441.44 ▼7.26

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means 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 fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/hide-broken-shortcodes/tests/phpunit/bootstrap.php
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      require_once(/tmp/wordpress-tests-lib/tests/phpunit/includes/functions.php): failed to open stream: No such file or directory in wp-content/plugins/hide-broken-shortcodes/tests/phpunit/bootstrap.php on line 29
    • > PHP Fatal error
      require_once(): Failed opening required '/tmp/wordpress-tests-lib/tests/phpunit/includes/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/hide-broken-shortcodes/tests/phpunit/bootstrap.php on line 29

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
6 plugin tags: content, shortcode, post, page, coffee2code...

hide-broken-shortcodes/hide-broken-shortcodes.php Passed 13 tests

The principal PHP file in "Hide Broken Shortcodes" v. 1.9.4 is loaded by WordPress automatically on each request
60 characters long description:
Prevent broken shortcodes from appearing in posts and pages.

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
There were no executable files found in this plugin523 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP487140269
Markdown4520219
Bourne Shell16221
XML10014

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity8.00
▷ Minimum class complexity6.00
▷ Maximum class complexity10.00
Average method complexity1.44
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods32
▷ Static methods618.75%
▷ Public methods32100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
There were not PNG files found in your plugin