74% redbrick-digital-core

Code Review | Redbrick Digital Core

WordPress plugin Redbrick Digital Core scored74%from 54 tests.

About plugin

  • Plugin page: redbrick-digital-...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-4.9.5
  • WordPress version: 6.3.1
  • First release: Jul 7, 2016
  • Latest release: Jan 25, 2022
  • Number of updates: 95
  • Update frequency: every 21.3 days
  • Top authors: alexdemchak (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /2,488 total downloads

Benchmarks

Plugin footprint 65% 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.60MB] [CPU: ▼49.97ms] Passed 4 tests

This is a short check of server-side resources used by Redbrick Digital Core
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.37 ▼1.098.31 ▼31.10
Dashboard /wp-admin2.43 ▼0.9211.55 ▼53.13
Posts /wp-admin/edit.php2.43 ▼0.9310.86 ▼37.52
Add New Post /wp-admin/post-new.php2.42 ▼3.4610.39 ▼78.12
Media Library /wp-admin/upload.php2.43 ▼0.8012.42 ▼24.34

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 24 new files
Database: no new tables, 9 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_rbd_core_widget_social_proof
widget_rbd_core_widget_review_slider
widget_rbd_core_widget_review_engine_display_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Redbrick Digital Core
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,141 ▲38014.35 ▲0.071.91 ▲0.2634.38 ▼8.85
Dashboard /wp-admin2,530 ▲3535.67 ▲0.0084.14 ▼13.5651.67 ▲7.93
Posts /wp-admin/edit.php2,437 ▲3372.02 ▲0.0035.64 ▼3.8536.78 ▲1.82
Add New Post /wp-admin/post-new.php1,855 ▲32923.18 ▼0.22664.22 ▼23.1375.81 ▲15.02
Media Library /wp-admin/upload.php1,734 ▲3314.20 ▼0.00106.29 ▼2.5355.94 ▲10.32

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the shortcode-review-engine-display handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin does not fully uninstall, leaving 9 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_rbd_core_widget_social_proof
    • can_compress_scripts
    • db_upgraded
    • widget_rbd_core_widget_review_slider
    • widget_theysaidso_widget
    • widget_rbd_core_widget_review_engine_display_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 14× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function rbd_core_social_proof_options() in wp-content/plugins/redbrick-digital-core/lib/widgets/social-proof/asset-functions/social-proof-admin.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/redbrick-digital-core/lib/widgets/social-proof/asset-functions/social-proof-front-end.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/redbrick-digital-core/lib/widgets/review-engine-display/asset-functions/review-engine-display-front-end.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/redbrick-digital-core/redbrick-digital-core.php:176
    • > PHP Fatal error
      Uncaught Error: Call to undefined function rbd_core_review_engine_display_widget_options() in wp-content/plugins/redbrick-digital-core/lib/widgets/review-engine-display/asset-functions/review-engine-display-admin.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/redbrick-digital-core/lib/widgets/review-slider/asset-functions/review-slider-front-end.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/redbrick-digital-core/lib/widgets/review-slider/widget-review-slider.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/redbrick-digital-core/lib/shortcodes/review-engine-display/shortcode-review-engine-display.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/redbrick-digital-core/lib/widgets/review-engine-display/widget-review-engine-display.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/redbrick-digital-core/admin/admin-core.php:6

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 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: reputation management, reviews, review engine

redbrick-digital-core/redbrick-digital-core.php 85% from 13 tests

The main PHP file in "Redbrick Digital Core" ver. 1.2 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Description: Keep the plugin description shorter than 140 characters (currently 142 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin2,219 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP14134661,134
CSS512417685
JavaScript48715400

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity6.25
▷ Minimum class complexity3.00
▷ Maximum class complexity16.00
Average method complexity1.70
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods29
▷ Static methods931.03%
▷ Public methods29100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions16
▷ Named functions743.75%
▷ Anonymous functions956.25%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin