84% wp-widgets-shortcode

Code Review | WordPress Widgets Shortcode

WordPress plugin WordPress Widgets Shortcode scored84%from 54 tests.

About plugin

  • Plugin page: wp-widgets-shortcode
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.7.1
  • WordPress version: 6.3.1
  • First release: Jun 22, 2013
  • Latest release: May 14, 2016
  • Number of updates: 8
  • Update frequency: every 163.8 days
  • Top authors: sbrajesh (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

1,000+ active /15,962 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by WordPress Widgets Shortcode
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.43 ▼4.07
Dashboard /wp-admin3.31 ▲0.0145.94 ▲1.37
Posts /wp-admin/edit.php3.36 ▲0.0144.32 ▼4.92
Add New Post /wp-admin/post-new.php5.89 ▲0.0181.11 ▼26.10
Media Library /wp-admin/upload.php3.24 ▲0.0135.25 ▲3.59

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for WordPress Widgets Shortcode
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.19 ▼0.341.81 ▲0.2644.01 ▲2.74
Dashboard /wp-admin2,192 ▲155.52 ▼0.0581.09 ▼6.6039.71 ▲1.59
Posts /wp-admin/edit.php2,100 ▼01.95 ▼0.0233.79 ▼4.7933.83 ▼3.02
Add New Post /wp-admin/post-new.php1,536 ▲822.97 ▼0.01657.35 ▲45.9260.24 ▲16.87
Media Library /wp-admin/upload.php1,400 ▼04.19 ▼0.0095.87 ▼1.9441.87 ▼2.13

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • 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
Even though no errors were found, this is by no means an exhaustive test

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
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wp-widgets-shortcode/wp-widgets-shortcode.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: embed, shortcodes, widgets, embed widgets, dynamic sidebar

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

"WordPress Widgets Shortcode" version 1.0.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
131 characters long description:
Embed any widget area(dynamic sidebar) to your WordPress pages/posts using the shortcode [widget-area id='The Name of Widget Area']

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin38 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1252238

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.07
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.25
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods125.00%
▷ Public methods250.00%
▷ Protected methods00.00%
▷ Private methods250.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected