68% wp-responsive-embeds

Code Review | WP Responsive Embeds

WordPress plugin WP Responsive Embeds scored 68% from 54 tests.

About plugin

  • Plugin page: wp-responsive-embeds
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.7
  • WordPress version: 6.3.1
  • First release: Dec 13, 2016
  • Latest release: Dec 16, 2016
  • Number of updates: 6
  • Update frequency: N/A
  • Top authors: JeremyEnglert (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

90+ active / 1,748 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.94MB] [CPU: ▼52.29ms] Passed 4 tests

Analyzing server-side resources used by WP Responsive Embeds
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.04 ▼1.425.00 ▼37.34
Dashboard /wp-admin2.06 ▼1.248.26 ▼38.34
Posts /wp-admin/edit.php2.06 ▼1.296.59 ▼39.99
Add New Post /wp-admin/post-new.php2.06 ▼3.825.88 ▼93.50
Media Library /wp-admin/upload.php2.06 ▼1.175.99 ▼26.78
WP Responsive Embeds /wp-admin/tools.php?page=wp_responsive_embeds2.066.50

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for WP Responsive Embeds
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,920 ▲16313.56 ▼0.815.06 ▲2.9442.62 ▼3.05
Dashboard /wp-admin2,214 ▲265.86 ▲0.8098.83 ▼5.5339.73 ▼4.13
Posts /wp-admin/edit.php2,097 ▲52.03 ▲0.0233.73 ▼6.4034.49 ▼0.14
Add New Post /wp-admin/post-new.php1,521 ▼1223.34 ▲0.05665.92 ▼4.9657.05 ▲10.48
Media Library /wp-admin/upload.php1,393 ▲24.25 ▲0.0895.91 ▼0.6640.84 ▼3.43
WP Responsive Embeds /wp-admin/tools.php?page=wp_responsive_embeds7882.0725.6826.45

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script 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 wpre-js handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
    • > GET request to /wp-admin/tools.php?page=wp_responsive_embeds
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script 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 wpre-js handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/tools.php?page=wp_responsive_embeds
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_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 wpre-css handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

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 items
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wp-responsive-embeds/wpre-shortcode.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-responsive-embeds/wpre-admin.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-responsive-embeds/wp-responsive-embeds.php:26

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

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
9 plugin tags: video, oembed, vimeo, responsive, embeds...

wp-responsive-embeds/wp-responsive-embeds.php 92% from 13 tests

Analyzing the main PHP file in "WP Responsive Embeds" version 1.0
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 200 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected64 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP3242761
JavaScript1002
CSS1001

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.04
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin