74% insert-shortcode-pattern

Code Review | Insert ShortCode Pattern

WordPress plugin Insert ShortCode Pattern scored74%from 54 tests.

About plugin

  • Plugin page: insert-shortcode-...
  • Plugin version: 1.1.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6.1-5.2.2
  • WordPress version: 6.3.1
  • First release: Oct 22, 2016
  • Latest release: Aug 30, 2019
  • Number of updates: 10
  • Update frequency: every 103.3 days
  • Top authors: 3vweb (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /922 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by Insert ShortCode Pattern
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0447.47 ▲1.09
Dashboard /wp-admin3.34 ▲0.0454.30 ▼1.06
Posts /wp-admin/edit.php3.39 ▲0.0452.44 ▼1.99
Add New Post /wp-admin/post-new.php5.92 ▲0.0490.08 ▼13.41
Media Library /wp-admin/upload.php3.27 ▲0.0440.66 ▲2.68
Insert ShortCode Pattern /wp-admin/options-general.php?page=ins-shortcode3.2335.07

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Insert ShortCode Pattern
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.28 ▼0.081.82 ▼0.1041.67 ▼6.06
Dashboard /wp-admin2,196 ▲225.55 ▼0.0990.43 ▼7.0540.24 ▼6.64
Posts /wp-admin/edit.php2,104 ▲11.97 ▼0.1434.30 ▼7.4435.34 ▼2.16
Add New Post /wp-admin/post-new.php1,532 ▲622.76 ▼0.33680.95 ▲23.6855.18 ▼1.55
Media Library /wp-admin/upload.php1,407 ▲74.18 ▼0.04100.22 ▼12.0444.12 ▼3.22
Insert ShortCode Pattern /wp-admin/options-general.php?page=ins-shortcode9001.9923.5829.49

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Warning in wp-content/plugins/insert-shortcode-pattern/insert-shortcode-pattern.php+64
    scandir(wp-content/uploads/insert-shortcode-pattern/): failed to open dir: No such file or directory
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, 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 items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/insert-shortcode-pattern/insert-shortcode-pattern.php:230

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

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Plugin Name: Please specify the plugin name on the first line ( === insert-shortcode-pattern === )
You can look at the official readme.txt

insert-shortcode-pattern/insert-shortcode-pattern.php 92% from 13 tests

"Insert ShortCode Pattern" version 1.1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 338 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin257 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP12117201
PO File122156

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 issues
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity34.00
▷ Minimum class complexity34.00
▷ Maximum class complexity34.00
Average method complexity7.60
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods5100.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
There are no PNG files in this plugin