74% wp-embed-widgets

Code Review | WP Embed Widgets

WordPress plugin WP Embed Widgets scored74%from 54 tests.

About plugin

  • Plugin page: wp-embed-widgets
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-6.2
  • WordPress version: 6.3.1
  • First release: Jul 25, 2019
  • Latest release: Mar 25, 2023
  • Number of updates: 15
  • Update frequency: every 89.3 days
  • Top authors: totalery (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,862 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.19MB] [CPU: ▼5.48ms] Passed 4 tests

Server-side resources used by WP Embed Widgets
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.71 ▲0.2445.49 ▲5.09
Dashboard /wp-admin3.52 ▲0.2249.03 ▼5.16
Posts /wp-admin/edit.php3.57 ▲0.2249.34 ▼8.81
Add New Post /wp-admin/post-new.php6.07 ▲0.1892.40 ▼8.96
Media Library /wp-admin/upload.php3.38 ▲0.1636.28 ▲1.03

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 40 new files
Database: 1 new table, 8 new options
New tables
wp_wpew_data
New WordPress options
wpew_settings
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options
wpew_db_version
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for WP Embed Widgets
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲3314.10 ▼0.041.76 ▼0.2343.99 ▲2.51
Dashboard /wp-admin2,203 ▲265.56 ▼0.2590.89 ▼13.5538.48 ▼3.92
Posts /wp-admin/edit.php2,105 ▲21.99 ▲0.0140.23 ▲5.6936.59 ▲2.08
Add New Post /wp-admin/post-new.php6,207 ▲4,68218.92 ▼4.64925.19 ▲258.4663.03 ▲8.80
Media Library /wp-admin/upload.php1,408 ▲114.19 ▼0.01101.37 ▼4.9743.62 ▼0.10

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie tables detected upon uninstall: 1 table
    • wp_wpew_data
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-embed-widgets/wp-embed-widgets.php:41

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: embed, widget shortcode, page, shortcode, widget

wp-embed-widgets/wp-embed-widgets.php 92% from 13 tests

The main PHP script in "WP Embed Widgets" version 1.0.0 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Requires PHP: Required version must match the one declared in readme.txt ("5.6" instead of "5.4")

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,008 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP21296498952
PO File1131555
JavaScript1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity8.90
▷ Minimum class complexity1.00
▷ Maximum class complexity50.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes20
▷ Abstract classes00.00%
▷ Concrete classes20100.00%
▷ Final classes15.00%
Methods106
▷ Static methods3331.13%
▷ Public methods10195.28%
▷ Protected methods21.89%
▷ Private methods32.83%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants7
▷ Global constants571.43%
▷ Class constants228.57%
▷ Public constants2100.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
PNG images were not found in this plugin