84% wporg-plugin-embed

Code Review | WordPress.org Plugin/Theme Information Embed

WordPress plugin WordPress.org Plugin/Theme Information Embed scored84%from 54 tests.

About plugin

  • Plugin page: wporg-plugin-embed
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.2
  • WordPress version: 6.3.1
  • First release: Feb 28, 2013
  • Latest release: Mar 21, 2023
  • Number of updates: 32
  • Update frequency: every 114.8 days
  • Top authors: leewillis77 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /3,024 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼9.65ms] Passed 4 tests

A check of server-side resources used by WordPress.org Plugin/Theme Information Embed
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0744.83 ▲8.20
Dashboard /wp-admin3.37 ▲0.0343.88 ▼16.18
Posts /wp-admin/edit.php3.48 ▲0.1345.92 ▼1.60
Add New Post /wp-admin/post-new.php5.95 ▲0.0681.77 ▼20.92
Media Library /wp-admin/upload.php3.29 ▲0.0633.77 ▲0.10

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

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

Browser metrics Passed 4 tests

A check of browser resources used by WordPress.org Plugin/Theme Information Embed
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲5613.41 ▼0.941.63 ▼0.0640.72 ▲0.92
Dashboard /wp-admin2,209 ▲184.87 ▼1.03108.04 ▲7.4335.53 ▼9.66
Posts /wp-admin/edit.php2,092 ▲32.06 ▲0.0139.58 ▲4.8835.60 ▲1.81
Add New Post /wp-admin/post-new.php1,514 ▼617.50 ▼5.70668.65 ▼13.7748.71 ▼3.41
Media Library /wp-admin/upload.php1,391 ▲34.22 ▼0.0196.96 ▼11.9544.19 ▼1.15

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 7 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • wpdotorg_oembed_key
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wporg-plugin-embed/wpdotorg-api.php:29

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, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes: Please take inspiration from this readme.txt

wporg-plugin-embed/wpdotorg-embed.php 92% from 13 tests

The main PHP script in "WordPress.org Plugin/Theme Information Embed" version 1.4 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("wporg-plugin-embed.php" instead of "wpdotorg-embed.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
Success! There were no dangerous files found in this plugin246 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2136122233
CSS11013

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity15.50
▷ Minimum class complexity6.00
▷ Maximum class complexity25.00
Average method complexity2.81
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods1168.75%
▷ Protected methods00.00%
▷ Private methods531.25%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
3 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png13.89KB6.63KB▼ 52.28%
images/wordpress-logo-notext-rgb.png1.38KB1.29KB▼ 6.73%
screenshot-2.png23.49KB9.75KB▼ 58.48%