78% wp-image-embeds

Code Review | WP Image Embeds

WordPress plugin WP Image Embeds scored 78% from 54 tests.

About plugin

  • Plugin page: wp-image-embeds
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6.0-5.2.2
  • WordPress version: 6.3.1
  • First release: Feb 18, 2016
  • Latest release: Sep 4, 2019
  • Number of updates: 6
  • Update frequency: every 216.2 days
  • Top authors: wpdevshed (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 1,528 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

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

Analyzing server-side resources used by WP Image Embeds
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0643.12 ▲3.78
Dashboard /wp-admin3.36 ▲0.0647.70 ▲0.44
Posts /wp-admin/edit.php3.48 ▲0.1244.10 ▼6.89
Add New Post /wp-admin/post-new.php5.95 ▲0.0683.91 ▼11.10
Media Library /wp-admin/upload.php3.29 ▲0.0634.68 ▲0.46
WP Image Embed /wp-admin/options-general.php?page=wpie_settings3.2531.22

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by WP Image Embeds
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,835 ▲7814.41 ▲0.031.81 ▼0.0544.84 ▲6.22
Dashboard /wp-admin2,213 ▲224.87 ▼1.01106.84 ▲4.3143.62 ▲0.87
Posts /wp-admin/edit.php2,093 ▲42.01 ▼0.0437.13 ▼1.3933.98 ▼2.91
Add New Post /wp-admin/post-new.php6,484 ▲4,95120.15 ▼3.01896.51 ▲218.1276.57 ▲23.39
Media Library /wp-admin/upload.php1,395 ▲44.29 ▲0.1398.25 ▲0.5744.19 ▲2.16
WP Image Embed /wp-admin/options-general.php?page=wpie_settings8022.0226.2126.69

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wp-image-embeds/index.php
  • 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/wp-image-embeds/includes/wpie-actions.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Screenshots: Add images for these screenshots: #1 (This is the modal popup that visitors will see if the plugin is active and they right click on an image.), #2 (These are the global settings which you will find under Settings > WP Image Embed. Check to enable the plugin on all pages and/or posts. If you do not enable globally you can still enable at the post or page level.), #3 (This is the post/page meta box. If you do not enable the plugin globally you can enable at the page or post level by checking here.)
The official readme.txt might help

wp-image-embeds/wp-image-embeds.php Passed 13 tests

The primary PHP file in "WP Image Embeds" version 1.0 is used by WordPress to initiate all plugin functionality
133 characters long description:
A simple way to passively build links by enabling webmasters and bloggers to embed images from your site (while linking back to you).

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin373 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP372129229
CSS1145105
JavaScript1161039

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity1.86
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods14
▷ Static methods17.14%
▷ Public methods1071.43%
▷ Protected methods00.00%
▷ Private methods428.57%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.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
3 PNG files occupy 0.21MB with 0.15MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png136.16KB35.91KB▼ 73.63%
screenshot-3.png34.42KB10.23KB▼ 70.29%
screenshot-2.png39.85KB11.58KB▼ 70.93%