84% shortcode-box

Code Review | Shortcode Box

WordPress plugin Shortcode Box scored84%from 54 tests.

About plugin

  • Plugin page: shortcode-box
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.8
  • WordPress version: 6.3.1
  • First release: Mar 2, 2014
  • Latest release: Mar 10, 2014
  • Number of updates: 27
  • Update frequency: every 0.3 days
  • Top authors: eflyjason (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active /2,030 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

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

This is a short check of server-side resources used by Shortcode Box
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.53 ▼8.68
Dashboard /wp-admin3.31 ▲0.0152.07 ▼3.34
Posts /wp-admin/edit.php3.36 ▲0.0148.56 ▼5.09
Add New Post /wp-admin/post-new.php5.89 ▲0.01106.27 ▲8.31
Media Library /wp-admin/upload.php3.24 ▲0.0145.45 ▲7.57
Shortcode Box /wp-admin/tools.php?page=shortcode-box-help3.2033.27

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Shortcode Box
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲3614.35 ▲0.221.66 ▼0.3248.88 ▲5.09
Dashboard /wp-admin2,201 ▲245.75 ▲0.0890.77 ▼10.1638.35 ▼0.47
Posts /wp-admin/edit.php2,106 ▲32.02 ▼0.0237.01 ▼7.4035.53 ▼0.32
Add New Post /wp-admin/post-new.php1,533 ▼022.95 ▼0.02673.30 ▼7.0251.02 ▼17.90
Media Library /wp-admin/upload.php1,409 ▲94.16 ▲0.01113.40 ▼10.3448.10 ▲0.09
Shortcode Box /wp-admin/tools.php?page=shortcode-box-help8492.1231.2535.40

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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
Please fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/shortcode-box/shortcode-box.php:34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/shortcode-box/help.php:5

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 Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
2 plugin tags: shortcode, box

shortcode-box/shortcode-box.php Passed 13 tests

"Shortcode Box" version 1.1.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
50 characters long description:
Add Useful Boxes to your blog simply by shortcode.

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
There were no executable files found in this plugin403 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
CSS2100197
PHP22425116
PO File2282890

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
10 PNG files occupy 0.13MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/stop.png3.21KB2.14KB▼ 33.09%
img/codee.png2.39KB1.89KB▼ 20.63%
img/warn.png52.24KB2.10KB▼ 95.97%
img/question.png3.08KB2.29KB▼ 25.55%
img/task.png3.86KB2.35KB▼ 39.16%