74% villoid-store-oembed

Code Review | Villoid Store oEmbed

WordPress plugin Villoid Store oEmbed scored74%from 54 tests.

About plugin

  • Plugin page: villoid-store-oembed
  • Plugin version: 1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.0
  • WordPress version: 6.3.1
  • First release: Jan 12, 2017
  • Latest release: Nov 2, 2017
  • Number of updates: 32
  • Update frequency: every 9.1 days
  • Top authors: villoid (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /568 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼1.93MB] [CPU: ▼55.18ms] Passed 4 tests

This is a short check of server-side resources used by Villoid Store oEmbed
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.05 ▼1.414.30 ▼37.79
Dashboard /wp-admin2.07 ▼1.235.34 ▼48.31
Posts /wp-admin/edit.php2.07 ▼1.285.02 ▼48.14
Add New Post /wp-admin/post-new.php2.07 ▼3.815.80 ▼86.46
Media Library /wp-admin/upload.php2.07 ▼1.166.35 ▼22.86

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Villoid Store oEmbed
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲6514.35 ▼0.271.89 ▲0.1140.09 ▲0.73
Dashboard /wp-admin2,199 ▲225.65 ▲0.0492.83 ▼9.5538.04 ▼14.19
Posts /wp-admin/edit.php2,104 ▲221.98 ▼0.0136.78 ▼2.4233.99 ▼5.76
Add New Post /wp-admin/post-new.php1,530 ▲423.47 ▼0.12671.37 ▲27.1857.39 ▲9.49
Media Library /wp-admin/upload.php1,407 ▲44.19 ▼0.04100.15 ▼0.9046.63 ▲0.01

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • 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 iframeResizer handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_oembed_add_provider() in wp-content/plugins/villoid-store-oembed/includes/class-wordpress-villoid-store-oembed.php:39

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: wordpress, plugin, template

villoid-store-oembed/oembedvilloidstore.php 85% from 13 tests

Analyzing the main PHP file in "Villoid Store oEmbed" version 1.6
Please take the time to fix the following:
  • 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: It is recommended to name the main PHP file as the plugin slug ("villoid-store-oembed.php" instead of "oembedvilloidstore.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected53 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP4163946
Markdown1204
JavaScript2103

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.07
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%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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