10% post-thumbnail-from-url

Code Review | Post Thumbnail from URL

WordPress plugin Post Thumbnail from URL scored 10% from 54 tests.

About plugin

  • Plugin page: post-thumbnail-fr...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.2
  • WordPress version: 6.3.1
  • First release: Jul 14, 2015
  • Latest release: Jul 14, 2015
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: michele.settembre (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active / 3,585 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/post-thumbnail-from-url/post-thumbnail-from-url.php+31
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼1.91MB] [CPU: ▼52.72ms] Passed 4 tests

An overview of server-side resources used by Post Thumbnail from URL
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.396.73 ▼38.81
Dashboard /wp-admin2.09 ▼1.216.45 ▼42.21
Posts /wp-admin/edit.php2.10 ▼1.267.12 ▼40.66
Add New Post /wp-admin/post-new.php2.10 ▼3.797.06 ▼89.18
Media Library /wp-admin/upload.php2.10 ▼1.137.18 ▼27.91
Post Thumbnail from URL /wp-admin/options-general.php?page=bcd-post-thumbnail-from-url-plugin2.106.08

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Post Thumbnail from URL: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.21 ▼1.092.09 ▼0.2740.09 ▼5.23
Dashboard /wp-admin2,207 ▲165.81 ▼0.0898.34 ▼2.6238.37 ▼9.45
Posts /wp-admin/edit.php2,093 ▲42.00 ▼0.0440.21 ▲0.1135.50 ▼0.31
Add New Post /wp-admin/post-new.php1,547 ▲518.34 ▼0.14650.25 ▲44.8662.72 ▲9.13
Media Library /wp-admin/upload.php1,392 ▲44.20 ▼0.0598.44 ▼0.5345.84 ▲1.03
Post Thumbnail from URL /wp-admin/options-general.php?page=bcd-post-thumbnail-from-url-plugin8082.0525.1928.28

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
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/post-thumbnail-from-url/post-thumbnail-from-url.php+31
    Trying to access array offset on value of type bool
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=bcd-post-thumbnail-from-url-plugin
    • > Notice in wp-content/plugins/post-thumbnail-from-url/post-thumbnail-from-url.php+31
    Trying to access array offset on value of type bool

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
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/post-thumbnail-from-url/post-thumbnail-from-url.php:30

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 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
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (Sample view of the Post Thumbnail from URL box.), #2 (Success message, now you are ready to open the media library and get the new image straight in your post.)
You can take inspiration from this readme.txt

post-thumbnail-from-url/post-thumbnail-from-url.php 92% from 13 tests

Analyzing the main PHP file in "Post Thumbnail from URL" version 1.0
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 152 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin314 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP12340130
PO File2264890
JavaScript121386
CSS1108

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png7.98KB4.23KB▼ 47.04%
screenshot-1.png44.29KB23.45KB▼ 47.06%