79% ra-widgets-bundle

Code Review | RA Widgets Bundle

WordPress plugin RA Widgets Bundle scored79%from 54 tests.

About plugin

  • Plugin page: ra-widgets-bundle
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.2
  • WordPress version: 6.3.1
  • First release: Nov 2, 2017
  • Latest release: Aug 20, 2019
  • Number of updates: 11
  • Update frequency: every 60.0 days
  • Top authors: FrodoBean (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /2,456 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼6.81ms] Passed 4 tests

This is a short check of server-side resources used by RA Widgets Bundle
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0539.22 ▼1.55
Dashboard /wp-admin3.35 ▼0.0047.50 ▼13.57
Posts /wp-admin/edit.php3.40 ▲0.0445.62 ▲1.13
Add New Post /wp-admin/post-new.php5.93 ▲0.0488.60 ▼11.12
Media Library /wp-admin/upload.php3.27 ▲0.0433.94 ▼0.98

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 29 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for RA Widgets Bundle
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲5614.74 ▲0.111.77 ▲0.0847.13 ▼2.22
Dashboard /wp-admin2,203 ▲185.83 ▼0.0597.31 ▼19.8241.41 ▼7.72
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0535.47 ▼1.6132.47 ▼0.12
Add New Post /wp-admin/post-new.php1,533 ▲1423.09 ▼0.15634.18 ▼64.8658.15 ▲3.97
Media Library /wp-admin/upload.php1,388 ▲64.19 ▼0.2097.00 ▼5.5241.88 ▼4.63

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • 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 everything seems fine, this is not 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
The following issues need your attention
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/ra-widgets-bundle/widgets/cta/tpl/default.php
  • 42× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: class in wp-content/plugins/ra-widgets-bundle/widgets/headline/tpl/default.php on line 4
    • > PHP Notice
      Undefined variable: class in wp-content/plugins/ra-widgets-bundle/widgets/button/tpl/default.php on line 7
    • > PHP Fatal error
      Uncaught Error: Class 'SiteOrigin_Widget' not found in wp-content/plugins/ra-widgets-bundle/widgets/cta/cta.php:9
    • > PHP Notice
      Undefined variable: class in wp-content/plugins/ra-widgets-bundle/widgets/testimonial/tpl/default.php on line 16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/ra-widgets-bundle/widgets/image/tpl/default.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/ra-widgets-bundle/widgets/headline/tpl/default.php:7
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/ra-widgets-bundle/widgets/image-carousel/tpl/default.php on line 22
    • > PHP Notice
      Undefined variable: subtitle in wp-content/plugins/ra-widgets-bundle/widgets/cta/tpl/default.php on line 15
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/ra-widgets-bundle/widgets/testimonial/tpl/default.php on line 6
    • > PHP Notice
      Undefined variable: title in wp-content/plugins/ra-widgets-bundle/widgets/testimonial/tpl/default.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
6 plugin tags: siteorigin-widgets, bundle, siteorigin-page-builder, siteorigin-widgets-api, siteorigin...

ra-widgets-bundle/ra-widgets-bundle.php Passed 13 tests

The primary PHP file in "RA Widgets Bundle" version 1.0.3 is used by WordPress to initiate all plugin functionality
77 characters long description:
A collection of widgets for WordPress built using the SiteOrigin Widgets API.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected1,962 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP151651181,403
PO File1109135241
JavaScript4122130
LESS34097
Sass110890
CSS1001

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity4.29
▷ Minimum class complexity2.00
▷ Maximum class complexity11.00
Average method complexity1.72
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods32
▷ Static methods00.00%
▷ Public methods32100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/owl.video.play.png4.86KB2.74KB▼ 43.61%