84% wp-bloginfo-shortcode

Code Review | Bloginfo Shortcode

WordPress plugin Bloginfo Shortcode scored84%from 54 tests.

About plugin

  • Plugin page: wp-bloginfo-short...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.6.1
  • WordPress version: 6.3.1
  • First release: Sep 25, 2013
  • Latest release: Sep 25, 2013
  • Number of updates: 3
  • Update frequency: every 32.7 days
  • Top authors: ethanpil (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active /1,475 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.00MB] [CPU: ▼4.85ms] Passed 4 tests

An overview of server-side resources used by Bloginfo Shortcode
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0042.79 ▼0.09
Dashboard /wp-admin3.31 ▲0.0051.19 ▼4.06
Posts /wp-admin/edit.php3.36 ▲0.0053.02 ▲1.51
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.23 ▼16.75
Media Library /wp-admin/upload.php3.24 ▲0.0044.54 ▲7.23

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

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

Browser metrics Passed 4 tests

Bloginfo Shortcode: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.34 ▼0.251.99 ▲0.4545.11 ▲3.75
Dashboard /wp-admin2,195 ▲185.67 ▲0.0087.95 ▼4.5142.49 ▲0.78
Posts /wp-admin/edit.php2,100 ▼02.00 ▼0.0039.48 ▲0.8938.50 ▲2.56
Add New Post /wp-admin/post-new.php1,526 ▼023.17 ▼0.35700.99 ▼15.5056.51 ▼3.97
Media Library /wp-admin/upload.php1,400 ▼34.22 ▲0.06113.27 ▲7.0547.16 ▲4.81

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wp-bloginfo-shortcode/wp-bloginfo-shortcode.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
2 plugin tags: shortcode, bloginfo

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

The main PHP script in "Bloginfo Shortcode" version 1.0 is automatically included on every request by WordPress
78 characters long description:
Add a [blog] shortcode to the Wordpress editor to include data from bloginfo()

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin9 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12109

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin