83% opal-widgets-for-elementor

Code Review | Opal Widgets For Elementor

WordPress plugin Opal Widgets For Elementor scored83%from 54 tests.

About plugin

  • Plugin page: opal-widgets-for-...
  • Plugin version: 1.6.9
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.9.2
  • WordPress version: 6.3.1
  • First release: Oct 15, 2018
  • Latest release: Aug 7, 2023
  • Number of updates: 124
  • Update frequency: every 14.2 days
  • Top authors: wpopal (100%)

Code review

54 tests

User reviews

1 review

Install metrics

3,000+ active /50,859 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

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

This is a short check of server-side resources used by Opal Widgets For Elementor
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.47 ▼3.22
Dashboard /wp-admin3.33 ▲0.0350.29 ▼8.26
Posts /wp-admin/edit.php3.38 ▲0.0355.14 ▲2.08
Add New Post /wp-admin/post-new.php5.91 ▲0.0397.99 ▼1.05
Media Library /wp-admin/upload.php3.26 ▲0.0332.75 ▼7.75

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 224 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Opal Widgets For Elementor
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.73 ▲0.191.64 ▼0.7846.28 ▲0.64
Dashboard /wp-admin2,195 ▲275.57 ▼0.0888.00 ▼2.6238.51 ▼2.28
Posts /wp-admin/edit.php2,103 ▲31.99 ▲0.0338.53 ▼0.6135.32 ▼5.03
Add New Post /wp-admin/post-new.php1,534 ▲618.09 ▼5.08621.40 ▼59.0469.38 ▲13.70
Media Library /wp-admin/upload.php1,400 ▼04.23 ▲0.1898.11 ▼14.4643.05 ▼2.88

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% 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 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
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/opal-widgets-for-elementor/includes/function-woo-hook-templates.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/opal-widgets-for-elementor/widgets/override/divider.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Shortcode_Products' not found in wp-content/plugins/opal-widgets-for-elementor/includes/class-woo-shortcode-products.php:2
    • > PHP Warning
      The use statement with non-compound name 'WPML_Elementor_Module_With_Items' has no effect in wp-content/plugins/opal-widgets-for-elementor/includes/wpml/widgets/timeline.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function language_attributes() in wp-content/plugins/opal-widgets-for-elementor/templates/elementor-preview.php:2

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

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: woocommerce elementor, nav menu page builder, elementor, widgets, footer builder...

opal-widgets-for-elementor/opalelementor.php 77% from 13 tests

The main file in "Opal Widgets For Elementor" v. 1.6.9 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("opal-widgets-for-elementor.php" instead of "opalelementor.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 151 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected64,408 lines of code in 205 files:
LanguageFilesBlank linesComment linesLines of code
PHP834,5892,52930,967
Sass1001,31719110,381
CSS481316210,013
JSON2009,685
JavaScript168932333,362

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity13.30
▷ Minimum class complexity1.00
▷ Maximum class complexity41.00
Average method complexity2.59
▷ Minimum method complexity1.00
▷ Maximum method complexity37.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes77
▷ Abstract classes22.60%
▷ Concrete classes7597.40%
▷ Final classes00.00%
Methods595
▷ Static methods142.35%
▷ Public methods37262.52%
▷ Protected methods19232.27%
▷ Private methods315.21%
Functions28
▷ Named functions2796.43%
▷ Anonymous functions13.57%
Constants10
▷ Global constants10100.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
There were not PNG files found in your plugin