94% wp-shortcode-shield

Code Review | WP Shortcode Shield

WordPress plugin WP Shortcode Shield scored 94% from 54 tests.

About plugin

  • Plugin page: wp-shortcode-shield
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-3.4.2
  • WordPress version: 5.8.1
  • First release: Apr 25, 2012
  • Latest release: Nov 12, 2012
  • Number of updates: 8
  • Update frequency: every 25.3 days
  • Top authors: vicchi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,926 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼140.99ms] Passed 4 tests

Server-side resources used by WP Shortcode Shield
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1339.64 ▲17.57
Dashboard /wp-admin3.07 ▲0.0249.50 ▲2.97
Posts /wp-admin/edit.php3.12 ▲0.0247.98 ▲2.71
Add New Post /wp-admin/post-new.php5.43 ▼0.0091.52 ▼572.09
Media Library /wp-admin/upload.php3.01 ▲0.0137.12 ▲2.47

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for WP Shortcode Shield
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10715.91 ▲0.427.65 ▼0.7053.66 ▲9.71
Dashboard /wp-admin2,969 ▲385.84 ▼0.11147.13 ▲0.81110.42 ▼4.74
Posts /wp-admin/edit.php2,739 ▼02.68 ▼0.0167.12 ▼3.5797.06 ▼6.30
Add New Post /wp-admin/post-new.php1,683 ▲1118.65 ▼0.22390.94 ▼2.74114.01 ▼9.82
Media Library /wp-admin/upload.php1,807 ▼05.01 ▼0.01149.45 ▼9.77131.10 ▲3.59

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-shortcode-shield/wp-shortcode-shield.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Screenshots: Add an image for screenshot #1 (Resultant Content Display)
The official readme.txt might help

wp-shortcode-shield/wp-shortcode-shield.php Passed 13 tests

The main PHP script in "WP Shortcode Shield" version 1.1.0 is automatically included on every request by WordPress
102 characters long description:
Allows posts and pages to easily document WordPress short-codes without the short-code being expanded.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin67 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2263967

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity4.00
▷ Minimum class complexity3.00
▷ Maximum class complexity5.00
Average method complexity1.86
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods7
▷ Static methods114.29%
▷ Public methods457.14%
▷ Protected methods00.00%
▷ Private methods342.86%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants133.33%
▷ Class constants266.67%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected