84% restrict-elementor-widgets

Code Review | Restrict Elementor Widgets, Columns & Sections

WordPress plugin Restrict Elementor Widgets, Columns & Sections scored84%from 54 tests.

About plugin

  • Plugin page: restrict-elemento...
  • Plugin version: 1.4
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Jan 12, 2021
  • Latest release: Jul 29, 2023
  • Number of updates: 7
  • Update frequency: every 133.1 days
  • Top authors: mukto90 (71.43%)codexpert (42.86%)

Code review

54 tests

User reviews

4 reviews

Install metrics

700+ active /4,723 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.08MB] [CPU: ▼6.77ms] Passed 4 tests

Analyzing server-side resources used by Restrict Elementor Widgets, Columns & Sections
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0638.18 ▼2.35
Dashboard /wp-admin3.32 ▲0.0138.17 ▼10.98
Posts /wp-admin/edit.php3.54 ▲0.1848.04 ▼8.78
Add New Post /wp-admin/post-new.php6.02 ▲0.1493.07 ▼3.85
Media Library /wp-admin/upload.php3.35 ▲0.1234.89 ▼3.46

Server storage [IO: ▲0.39MB] [DB: ▲0.04MB] Passed 3 tests

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 59 new files
Database: no new tables, 9 new options
New WordPress options
widget_recent-comments
codexpert-blog-json
restrict-elementor-widgets-docs-json
pl-survey_restrict-elementor-widgets-activated
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Restrict Elementor Widgets, Columns & Sections
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,975 ▲21413.90 ▼0.488.62 ▲6.8840.50 ▼8.80
Dashboard /wp-admin2,295 ▲1155.65 ▲0.0396.03 ▲6.8446.27 ▲3.77
Posts /wp-admin/edit.php2,156 ▲562.05 ▲0.0242.98 ▲4.7735.63 ▲0.91
Add New Post /wp-admin/post-new.php1,571 ▲3423.42 ▲5.16638.78 ▼17.6162.72 ▼9.25
Media Library /wp-admin/upload.php1,455 ▲554.35 ▲0.14100.44 ▼8.8142.73 ▼6.97

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 8 options
    • theysaidso_admin_options
    • codexpert-blog-json
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • restrict-elementor-widgets-docs-json
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
Please fix the following
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/restrict-elementor-widgets/views/settings/extensions.php:1
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/restrict-elementor-widgets/functions/helpers.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/plugin.php' (include_path='.:/usr/share/php') in wp-content/plugins/restrict-elementor-widgets/functions/helpers.php on line 3
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/restrict-elementor-widgets/functions/helpers.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'Codexpert\\Plugin\\Base' not found in wp-content/plugins/restrict-elementor-widgets/src/Settings.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 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
3 plugin tags: restrict widget, lock elementor, restrict elementor

restrict-elementor-widgets/restrict-elementor-widgets.php 92% from 13 tests

"Restrict Elementor Widgets, Columns & Sections" version 1.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin4,934 lines of code in 54 files:
LanguageFilesBlank linesComment linesLines of code
PHP368711,1493,492
CSS65111,054
JavaScript6140234
JSON400152
Markdown2002

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity23.61
▷ Minimum class complexity1.00
▷ Maximum class complexity228.00
Average method complexity3.60
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces6
Interfaces0
Traits0
Classes23
▷ Abstract classes28.70%
▷ Concrete classes2191.30%
▷ Final classes14.76%
Methods202
▷ Static methods2411.88%
▷ Public methods19295.05%
▷ Protected methods31.49%
▷ Private methods73.47%
Functions24
▷ Named functions1979.17%
▷ Anonymous functions520.83%
Constants5
▷ Global constants5100.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
4 PNG files occupy 0.13MB with 0.06MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/codexpert/plugin/src/assets/img/checked.png18.81KB9.90KB▼ 47.36%
assets/img/rew-wc.png49.27KB26.33KB▼ 46.56%
assets/img/rew-wcs.png56.80KB29.54KB▼ 48.00%
vendor/codexpert/plugin/src/assets/img/survey.png7.31KB3.08KB▼ 57.88%