84% yahoo-screen-embed

Code Review | Yahoo Screen Embed

WordPress plugin Yahoo Screen Embed scored 84% from 54 tests.

About plugin

  • Plugin page: yahoo-screen-embed
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-3.8
  • WordPress version: 6.3.1
  • First release: Jan 9, 2014
  • Latest release: Jan 10, 2014
  • Number of updates: 6
  • Update frequency: N/A
  • Top authors: TJNowell (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,172 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

Analyzing server-side resources used by Yahoo Screen Embed
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0137.99 ▼7.99
Dashboard /wp-admin3.31 ▲0.0147.77 ▼1.64
Posts /wp-admin/edit.php3.36 ▲0.0048.53 ▲0.76
Add New Post /wp-admin/post-new.php5.89 ▲0.00121.60 ▲19.25
Media Library /wp-admin/upload.php3.23 ▲0.0033.52 ▼0.81

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Yahoo Screen Embed
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.48 ▼0.111.61 ▼0.3936.95 ▼14.30
Dashboard /wp-admin2,209 ▲215.91 ▲1.04107.43 ▼9.6740.13 ▼11.40
Posts /wp-admin/edit.php2,089 ▼02.01 ▲0.0239.77 ▲4.3435.51 ▲1.28
Add New Post /wp-admin/post-new.php1,538 ▲123.46 ▲0.25666.95 ▲36.0060.79 ▲6.92
Media Library /wp-admin/upload.php1,388 ▼34.29 ▲0.1099.85 ▲1.5141.55 ▼2.17

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 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/yahoo-screen-embed/yahoo-screen.php:48

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
4 plugin tags: yahoo, oembed, embed, video

yahoo-screen-embed/yahoo-screen.php 92% from 13 tests

"Yahoo Screen Embed" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("yahoo-screen-embed.php" instead of "yahoo-screen.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
No dangerous file extensions were detected52 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP191029
JSON10020
Markdown1103

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods133.33%
▷ Public methods3100.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

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin