68% featured-image-from-external-sources

Code Review | Featured Image from External Sources

WordPress plugin Featured Image from External Sources scored68%from 54 tests.

About plugin

  • Plugin page: featured-image-fr...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-5.3.2
  • WordPress version: 6.3.1
  • First release: Jan 28, 2020
  • Latest release: Jan 30, 2020
  • Number of updates: 24
  • Update frequency: every 0.1 days
  • Top authors: deckercz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /456 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼1.23MB] [CPU: ▼48.89ms] Passed 4 tests

Analyzing server-side resources used by Featured Image from External Sources
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.74 ▼0.7214.16 ▼30.58
Dashboard /wp-admin2.79 ▼0.5218.52 ▼34.35
Posts /wp-admin/edit.php2.79 ▼0.5714.77 ▼34.92
Add New Post /wp-admin/post-new.php2.79 ▼3.1017.64 ▼95.71
Media Library /wp-admin/upload.php2.79 ▼0.4415.62 ▼17.95
Featured Image from External Sources /wp-admin/options-general.php?page=fifes2.7915.50

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 45 new files
Database: no new tables, 14 new options
New WordPress options
fi_email_body
fi_zdroj
fi_terms_of_use
widget_theysaidso_widget
theysaidso_admin_options
fi_email_notification_subject
widget_recent-posts
db_upgraded
widget_recent-comments
fi_email_subject
...

Browser metrics Passed 4 tests

Checking browser requirements for Featured Image from External Sources
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.35 ▲0.091.76 ▼0.0843.68 ▼0.17
Dashboard /wp-admin2,202 ▲255.62 ▲0.0290.01 ▲3.4248.12 ▲4.67
Posts /wp-admin/edit.php2,104 ▲42.02 ▲0.0435.50 ▼5.4434.16 ▼4.99
Add New Post /wp-admin/post-new.php6,236 ▲4,71025.98 ▲2.94933.24 ▲300.3354.14 ▲4.53
Media Library /wp-admin/upload.php1,407 ▲74.22 ▲0.0195.27 ▼11.5043.64 ▼0.64
Featured Image from External Sources /wp-admin/options-general.php?page=fifes1,2712.2229.0769.24

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/featured-image-from-external-sources/featured-image-from-external-sources.php+38
    Undefined index: post
  • Zombie WordPress options detected upon uninstall: 14 options
    • fi_blinded_assistent_email
    • fi_terms_of_use
    • fi_zdroj
    • fi_blinded_on
    • widget_recent-posts
    • fi_email_notification_subject
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • fi_email_body
    • ...

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=fifes
    • > Notice in wp-content/plugins/featured-image-from-external-sources/featured-image-from-external-sources.php+38
    Undefined index: post

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
Almost there! Just fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/featured-image-from-external-sources/featured-image-from-external-sources.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/featured-image-from-external-sources/sponsors.php:3

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 on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% 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:
  • Donate link: Invalid URI found ("")
  • Screenshots: Screenshot #1 (http://plugins.svn.wordpress.org/featured-image-from-google-images/assets/screen1.png) image missing
The official readme.txt might help

featured-image-from-external-sources/featured-image-from-external-sources.php Passed 13 tests

Analyzing the main PHP file in "Featured Image from External Sources" version 1.0
47 characters long description:
Fastest way to choose thumbnail for your posts.

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
Good job! No executable or dangerous file extensions detected3,316 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP39284652,498
CSS16127621
PO File14551148
JavaScript1696449

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity193.50
▷ Minimum class complexity138.00
▷ Maximum class complexity249.00
Average method complexity5.28
▷ Minimum method complexity1.00
▷ Maximum method complexity66.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods90
▷ Static methods11.11%
▷ Public methods7583.33%
▷ Protected methods1516.67%
▷ Private methods00.00%
Functions23
▷ Named functions23100.00%
▷ Anonymous functions00.00%
Constants22
▷ Global constants22100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
26 PNG files occupy 0.60MB with 0.32MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
in-admin-panel/images/donate/heineken.png49.31KB14.22KB▼ 71.17%
in-admin-panel/images/donate/budweiser.png44.03KB11.32KB▼ 74.29%
in-admin-panel/images/search.png0.57KB0.44KB▼ 23.21%
in-admin-panel/images/donate/clock.png1.68KB1.27KB▼ 24.21%
in-admin-panel/images/donate/desperados.png36.18KB9.49KB▼ 73.77%