84% oembed-styling

Code Review | oEmbed styling

WordPress plugin oEmbed styling scored84%from 54 tests.

About plugin

  • Plugin page: oembed-styling
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9-4.4.1
  • WordPress version: 6.3.1
  • First release: Aug 24, 2010
  • Latest release: Jan 13, 2016
  • Number of updates: 18
  • Update frequency: every 109.7 days
  • Top authors: honza.skypala (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

80+ active /3,917 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.02ms] Passed 4 tests

An overview of server-side resources used by oEmbed styling
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.70 ▲0.40
Dashboard /wp-admin3.32 ▼0.0343.41 ▼14.32
Posts /wp-admin/edit.php3.37 ▲0.0146.13 ▲1.76
Add New Post /wp-admin/post-new.php5.90 ▲0.0188.17 ▲0.71
Media Library /wp-admin/upload.php3.24 ▲0.0132.47 ▼2.85

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

oEmbed styling: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.23 ▼0.121.51 ▼0.0938.18 ▼4.19
Dashboard /wp-admin2,198 ▲235.61 ▲0.0290.72 ▼11.2142.20 ▲3.13
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0540.09 ▲5.3536.12 ▲0.72
Add New Post /wp-admin/post-new.php1,529 ▲323.30 ▲0.26577.06 ▼75.3847.57 ▼5.46
Media Library /wp-admin/upload.php1,400 ▼04.14 ▼0.0594.16 ▼18.2742.06 ▼6.69

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means 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
The following issues need your attention
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/oembed-styling/oEmbed-styling.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/oembed-styling/oEmbed-styling.php:18
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/oembed-styling/oEmbed-styling.php on line 12
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/oembed-styling/oEmbed-styling.php on line 12

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
7 plugin tags: center, custom style, video, image, css...

oembed-styling/oEmbed-styling.php 92% from 13 tests

"oEmbed styling" version 1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("oembed-styling.php" instead of "oEmbed-styling.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin21 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP171021

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin