78% info-boxes-shortcode-and-widget

Code Review | Info Boxes Shortcode and Widget

WordPress plugin Info Boxes Shortcode and Widget scored78%from 54 tests.

About plugin

  • Plugin page: info-boxes-shortc...
  • Plugin version: 1.15
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-5.9
  • WordPress version: 6.3.1
  • First release: May 29, 2014
  • Latest release: Apr 1, 2022
  • Number of updates: 23
  • Update frequency: every 124.5 days
  • Top authors: OTWthemes (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

700+ active /31,729 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲1.12MB] [CPU: ▲4.21ms] Passed 4 tests

Analyzing server-side resources used by Info Boxes Shortcode and Widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.57 ▲1.1152.66 ▲11.56
Dashboard /wp-admin4.42 ▲1.1261.20 ▲6.02
Posts /wp-admin/edit.php4.48 ▲1.1263.25 ▲2.12
Add New Post /wp-admin/post-new.php7.03 ▲1.14100.67 ▼2.88
Media Library /wp-admin/upload.php4.37 ▲1.1456.56 ▲15.60
otwfcr /wp-admin/admin.php?page=otwfcr4.3248.42
License Manager /wp-admin/admin.php?page=otw-ibsw-lm4.38180.89
Settings /wp-admin/admin.php?page=otw-ibsw-settings4.3245.85

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 127 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_otw_shortcode_widget
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Info Boxes Shortcode and Widget
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,865 ▲10414.20 ▼0.581.64 ▼0.0342.87 ▼1.77
Dashboard /wp-admin2,243 ▲635.83 ▲0.2391.01 ▼1.1969.15 ▲21.04
Posts /wp-admin/edit.php2,157 ▲572.31 ▲0.3439.79 ▼4.3932.73 ▼6.81
Add New Post /wp-admin/post-new.php6,407 ▲4,88127.94 ▲4.43869.91 ▲167.5436.55 ▼13.81
Media Library /wp-admin/upload.php1,451 ▲574.47 ▲0.26101.03 ▼1.0066.62 ▲21.90
otwfcr /wp-admin/admin.php?page=otwfcr8241.8925.1824.34
License Manager /wp-admin/admin.php?page=otw-ibsw-lm9681.8128.9325.04
Settings /wp-admin/admin.php?page=otw-ibsw-settings9301.9427.4539.75

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_otw_shortcode_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/info-boxes-shortcode-and-widget/include/otw_components/otw_factory/views/action_message.php
    • > /wp-content/plugins/info-boxes-shortcode-and-widget/include/otw_components/otw_shortcode/libs/recaptcha-php-1.11/example-mailhide.php
  • 14× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/info-boxes-shortcode-and-widget/otw_content_manager.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'OTW_Component' not found in wp-content/plugins/info-boxes-shortcode-and-widget/include/otw_components/otw_validator/otw_validator.class.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/info-boxes-shortcode-and-widget/include/otw_labels/otw_ibsw_shortcode_object.labels.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function otw_post() in wp-content/plugins/info-boxes-shortcode-and-widget/include/otw_components/otw_shortcode/libs/recaptcha-php-1.11/example-captcha.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/info-boxes-shortcode-and-widget/include/otw_ibsw_settings.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'OTW_Component' not found in wp-content/plugins/info-boxes-shortcode-and-widget/include/otw_components/otw_factory/otw_factory.class.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'OTW_Shortcodes' not found in wp-content/plugins/info-boxes-shortcode-and-widget/include/otw_components/otw_shortcode/shortcodes/otw_shortcode_info_box.class.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'OTW_Component' not found in wp-content/plugins/info-boxes-shortcode-and-widget/include/otw_components/otw_form/otw_form.class.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/info-boxes-shortcode-and-widget/include/otw_components/otw_shortcode/widgets/otw_shortcode_widget.class.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/info-boxes-shortcode-and-widget/include/otw_labels/otw_ibsw_factory_object.labels.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: Add images for these screenshots: #1 (WYSIWYG page/post editor button), #2 (OTW Shortcode Widget), #3 (Info Boxes Options), #4 (Front-end)
Please take inspiration from this readme.txt

info-boxes-shortcode-and-widget/otw_content_manager.php 92% from 13 tests

The main PHP file in "Info Boxes Shortcode and Widget" ver. 1.15 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("info-boxes-shortcode-and-widget.php" instead of "otw_content_manager.php")

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 plugin17,260 lines of code in 60 files:
LanguageFilesBlank linesComment linesLines of code
CSS144721137,722
PHP271,4519214,751
SVG4002,709
JavaScript145061322,061
JSON10017

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity76.56
▷ Minimum class complexity1.00
▷ Maximum class complexity193.00
Average method complexity5.28
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods159
▷ Static methods2213.84%
▷ Public methods12075.47%
▷ Protected methods2716.98%
▷ Private methods127.55%
Functions47
▷ Named functions47100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
35 compressed PNG files occupy 0.51MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
include/otw_components/otw_shortcode/images/diag-background-translucent.png0.08KB0.10KB0.00%
include/otw_components/otw_form/img/colorpicker/colorpicker_background.png1.85KB2.14KB0.00%
include/otw_components/otw_shortcode/images/pattern-4.png0.09KB0.12KB0.00%
include/otw_components/otw_form/img/colorpicker/colorpicker_hsb_b.png0.95KB0.76KB▼ 19.48%
include/otw_components/otw_shortcode/images/diag-background.png0.08KB0.10KB0.00%