78% essential-widgets

Code Review | Essential Widgets

WordPress plugin Essential Widgets scored78%from 54 tests.

About plugin

  • Plugin page: essential-widgets
  • Plugin version: 2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.4
  • WordPress version: 6.3.1
  • First release: Nov 22, 2017
  • Latest release: Nov 15, 2023
  • Number of updates: 32
  • Update frequency: every 68.3 days
  • Top authors: catchthemes (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20,000+ active /392,589 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.67MB] [CPU: ▲1.98ms] Passed 4 tests

Analyzing server-side resources used by Essential Widgets
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.20 ▲0.7347.42 ▲7.05
Dashboard /wp-admin4.00 ▲0.7047.29 ▼5.16
Posts /wp-admin/edit.php4.05 ▲0.7051.05 ▲1.96
Add New Post /wp-admin/post-new.php6.56 ▲0.6793.63 ▲4.06
Media Library /wp-admin/upload.php3.86 ▲0.6339.14 ▲8.15

Server storage [IO: ▲0.50MB] [DB: ▲0.07MB] Passed 3 tests

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 58 new files
Database: no new tables, 13 new options
New WordPress options
widget_ew-tag
widget_ew-author
widget_theysaidso_widget
can_compress_scripts
widget_ew-menus
db_upgraded
theysaidso_admin_options
widget_ew-archive
widget_ew-category
widget_ew-pages
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Essential Widgets
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,889 ▲12713.77 ▼0.479.35 ▲7.6342.62 ▼1.68
Dashboard /wp-admin2,205 ▲315.63 ▼0.0794.09 ▲3.0944.37 ▼0.97
Posts /wp-admin/edit.php2,116 ▲191.95 ▼0.0840.25 ▲4.3435.79 ▲1.38
Add New Post /wp-admin/post-new.php6,209 ▲4,67819.05 ▼3.99853.90 ▲150.2757.66 ▲2.61
Media Library /wp-admin/upload.php1,416 ▲164.25 ▲0.0998.93 ▲0.4541.33 ▼0.59

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 13 options in the database
    • widget_ew-archive
    • widget_ew-pages
    • widget_ew-tag
    • widget_ew-menus
    • widget_recent-comments
    • widget_recent-posts
    • widget_ew-category
    • db_upgraded
    • widget_ew-posts
    • widget_ew-author
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 0% 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
Please fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/essential-widgets/public/partials/essential-widgets-public-display.php
  • 22× 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 esc_html_e() in wp-content/plugins/essential-widgets/admin/partials/sidebar.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/essential-widgets/includes/widgets/class-ew-authors.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/essential-widgets/includes/widgets/class-ew-posts.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function essential_widgets_get_options() in wp-content/plugins/essential-widgets/includes/widgets/widgets.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/essential-widgets/includes/ew-block/index.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/essential-widgets/includes/widgets/class-ew-menus.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/essential-widgets/includes/ew-block/blocks/ew-category/index.php:100
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/essential-widgets/includes/widgets/class-ew-categories.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/essential-widgets/includes/ew-block/blocks/ew-menu/index.php:73
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/essential-widgets/includes/ew-block/blocks/ew-author/index.php:80

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 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
5 plugin tags: categories, pages, tags, widgets, posts

essential-widgets/essential-widgets.php 92% from 13 tests

The main file in "Essential Widgets" v. 2.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 179 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin5,512 lines of code in 44 files:
LanguageFilesBlank linesComment linesLines of code
PHP339161,0583,645
CSS4251951,185
PO File1209362554
JavaScript63066128

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity13.25
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity3.61
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes00.00%
Methods76
▷ Static methods33.95%
▷ Public methods7193.42%
▷ Protected methods00.00%
▷ Private methods56.58%
Functions32
▷ Named functions2887.50%
▷ Anonymous functions412.50%
Constants4
▷ Global constants4100.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
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/premium-plugin-246x116.png9.01KB4.16KB▼ 53.83%
admin/images/free-plugin-246x116.png8.01KB3.81KB▼ 52.42%