84% shortcode-callback

Code Review | Shortcode Callback

WordPress plugin Shortcode Callback scored84%from 54 tests.

About plugin

  • Plugin page: shortcode-callback
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.5-4.3.0
  • WordPress version: 6.3.1
  • First release: Jun 18, 2015
  • Latest release: Aug 17, 2015
  • Number of updates: 8
  • Update frequency: every 7.5 days
  • Top authors: digitalpoint (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,480 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
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by Shortcode Callback
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.98 ▲2.59
Dashboard /wp-admin3.32 ▲0.0149.38 ▼1.59
Posts /wp-admin/edit.php3.37 ▲0.0145.80 ▼8.05
Add New Post /wp-admin/post-new.php5.90 ▲0.0187.98 ▼14.95
Media Library /wp-admin/upload.php3.24 ▲0.0135.73 ▼3.67

Server storage [IO: ▲0.01MB] [DB: ▲0.07MB] Passed 3 tests

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Shortcode Callback
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.27 ▲0.072.20 ▲0.3449.03 ▲1.02
Dashboard /wp-admin2,192 ▲185.54 ▼0.0386.43 ▼8.4138.30 ▼3.72
Posts /wp-admin/edit.php2,100 ▼01.97 ▲0.0333.89 ▼4.6633.12 ▼1.48
Add New Post /wp-admin/post-new.php1,526 ▼223.70 ▲0.48689.34 ▼4.6158.49 ▲5.34
Media Library /wp-admin/upload.php1,400 ▼04.27 ▲0.08106.19 ▲7.4544.48 ▼2.13

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/shortcode-callback/shortcode-callback.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

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
9 plugin tags: short code, code, digitalpoint, callback, inject...

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

"Shortcode Callback" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
108 characters long description:
Adds a [callback] shortcode that allows you to execute an arbitrary PHP function or method within your post.

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

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.40
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods120.00%
▷ Public methods240.00%
▷ Protected methods360.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin