84% post-embeds

Code Review | Post Embeds - Customize your WordPress post embeds

WordPress plugin Post Embeds - Customize your WordPress post embeds scored84%from 54 tests.

About plugin

  • Plugin page: post-embeds
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Dec 30, 2022
  • Latest release: Jan 9, 2023
  • Number of updates: 8
  • Update frequency: every 1.4 days
  • Top authors: htmgarcia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /816 total downloads

Benchmarks

Plugin footprint 83% 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: ▲0.01MB] [CPU: ▼5.71ms] Passed 4 tests

Analyzing server-side resources used by Post Embeds - Customize your WordPress post embeds
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.65 ▼10.74
Dashboard /wp-admin3.31 ▲0.0149.76 ▼8.36
Posts /wp-admin/edit.php3.36 ▲0.0151.16 ▼0.34
Add New Post /wp-admin/post-new.php5.89 ▲0.0189.59 ▼3.38
Media Library /wp-admin/upload.php3.24 ▲0.0139.22 ▲1.47
Post Embeds /wp-admin/options-general.php?page=vg_post_embeds3.2033.41

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 17 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
vg_post_embeds_settings
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Post Embeds - Customize your WordPress post embeds
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.38 ▲0.082.11 ▲0.0839.79 ▼6.24
Dashboard /wp-admin2,199 ▲195.64 ▼0.0292.72 ▼10.6238.50 ▼7.46
Posts /wp-admin/edit.php2,104 ▲41.97 ▼0.0542.06 ▲4.9038.26 ▲3.27
Add New Post /wp-admin/post-new.php1,548 ▲1523.06 ▼0.08659.77 ▼5.2454.57 ▲2.72
Media Library /wp-admin/upload.php1,404 ▲74.23 ▲0.0199.38 ▼6.1246.18 ▲2.33
Post Embeds /wp-admin/options-general.php?page=vg_post_embeds1,0632.0228.0324.98

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • vg_post_embeds_settings

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)
The smoke test was a success, however most plugin functionality was not tested

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
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function language_attributes() in wp-content/plugins/post-embeds/templates/default.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function has_post_thumbnail() in wp-content/plugins/post-embeds/templates/parts/image.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function language_attributes() in wp-content/plugins/post-embeds/templates/social-bird.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function language_attributes() in wp-content/plugins/post-embeds/templates/social-mark.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function language_attributes() in wp-content/plugins/post-embeds/templates/404.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
3 plugin tags: post, embeds, design

post-embeds/post-embeds.php 92% from 13 tests

The principal PHP file in "Post Embeds - Customize your WordPress post embeds" v. 1.0.0 is loaded by WordPress automatically on each request
The following require your attention:
  • Requires PHP: The required version number did not match the one declared in readme.txt ("5.6" instead of "5.6.20")

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
Everything looks great! No dangerous files found in this plugin1,937 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP7142213951
Sass41700793
JavaScript14426179
JSON10011
CSS3003

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity84.00
▷ Minimum class complexity84.00
▷ Maximum class complexity84.00
Average method complexity5.39
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods19
▷ Static methods00.00%
▷ Public methods1789.47%
▷ Protected methods00.00%
▷ Private methods210.53%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin