10% webthumb

Code Review | WPF-WebThumb

WordPress plugin WPF-WebThumb scored10%from 54 tests.

About plugin

  • Plugin page: webthumb
  • Plugin version: 0.27
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.2-4.0
  • WordPress version: 6.3.1
  • First release: Jul 20, 2012
  • Latest release: Jul 19, 2014
  • Number of updates: 57
  • Update frequency: every 12.8 days
  • Top authors: faina09 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,277 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Please fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/webthumb/Bluga/Autoload.php+48
    __autoload() is deprecated, use spl_autoload_register() instead

Server metrics [RAM: ▼1.84MB] [CPU: ▼55.22ms] Passed 4 tests

This is a short check of server-side resources used by WPF-WebThumb
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.19 ▼1.315.63 ▼35.60
Dashboard /wp-admin2.21 ▼1.137.14 ▼46.99
Posts /wp-admin/edit.php2.22 ▼1.196.95 ▼45.66
Add New Post /wp-admin/post-new.php2.22 ▼3.726.86 ▼92.63
Media Library /wp-admin/upload.php2.22 ▼1.067.51 ▼31.90
WPF-WebThumb /wp-admin/options-general.php?page=webthumb2.226.44

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 40 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_webthumbwidget
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by WPF-WebThumb
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,828 ▲6714.38 ▲0.022.27 ▲0.6646.70 ▲7.53
Dashboard /wp-admin2,196 ▲225.58 ▼0.1989.72 ▼4.7543.63 ▲7.88
Posts /wp-admin/edit.php2,104 ▲42.16 ▲0.1835.01 ▼1.1131.60 ▼0.59
Add New Post /wp-admin/post-new.php1,531 ▲323.24 ▲0.20710.38 ▲6.3773.75 ▲18.93
Media Library /wp-admin/upload.php1,404 ▲104.22 ▲0.02111.55 ▲14.2450.36 ▲2.33
WPF-WebThumb /wp-admin/options-general.php?page=webthumb8802.0023.3329.45

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/webthumb/Bluga/Autoload.php+48
    __autoload() is deprecated, use spl_autoload_register() instead
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_webthumbwidget
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • 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
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=webthumb
    • > Deprecated in wp-content/plugins/webthumb/Bluga/Autoload.php+48
    __autoload() is deprecated, use spl_autoload_register() instead
    • > GET request to /wp-admin/options-general.php?page=webthumb
    • > Deprecated in wp-content/plugins/webthumb/wpf-webthumb_widget.php+2
    Methods with the same name as their class will not be constructors in a future version of PHP; WebThumbWidget has a deprecated constructor
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=webthumb
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=webthumb
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(http://www.fillyourtaproom.com/wp-json/wp/v2/posts?per_page=10): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known

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
Please take a closer look at the following
  • 14× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Bluga_Webthumb_Request' not found in wp-content/plugins/webthumb/Bluga/Webthumb/Request/Status.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Bluga_HTTP_Request_Adapter' not found in wp-content/plugins/webthumb/Bluga/HTTP/Request/Adapter/Http.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Bluga_HTTP_Request_Adapter' not found in wp-content/plugins/webthumb/Bluga/HTTP/Request/Adapter/Phpsocket.php:45
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/webthumb/wpf-webthumb_admin_cache.php:2
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/webthumb/Bluga/Http/Request/AllFiles.php' (include_path='.:/usr/share/php') in wp-content/plugins/webthumb/Bluga/Webthumb/AllFiles.php on line 5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/webthumb/wpf-webthumb_widget.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Bluga_HTTP_Request_Adapter' not found in wp-content/plugins/webthumb/Bluga/HTTP/Request/Adapter/Curl.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/webthumb/wpf-webthumb_admin_settings.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Bluga_Webthumb_Request' not found in wp-content/plugins/webthumb/Bluga/Webthumb/Request/Fetch.php:3
    • > PHP Warning
      require_once(wp-content/plugins/webthumb/Bluga/Http/Request/AllFiles.php): failed to open stream: No such file or directory in wp-content/plugins/webthumb/Bluga/Webthumb/AllFiles.php on line 5

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (Setup WPF-WebThumb), #2 (Some web site images fetched by WPF-WebThumb)
You can take inspiration from this readme.txt

webthumb/webthumb.php Passed 13 tests

The entry point to "WPF-WebThumb" version 0.27 is a PHP file that has certain tags in its header comment area
74 characters long description:
Create thumbnails of any web page using a choice of webthumb API services:

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
Good job! No executable or dangerous file extensions detected2,494 lines of code in 34 files:
LanguageFilesBlank linesComment linesLines of code
PHP253647132,164
PO File15867202
JavaScript282461
CSS25442
HTML421225

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity11.05
▷ Minimum class complexity1.00
▷ Maximum class complexity53.00
Average method complexity2.81
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes20
▷ Abstract classes15.00%
▷ Concrete classes1995.00%
▷ Final classes00.00%
Methods111
▷ Static methods10.90%
▷ Public methods8980.18%
▷ Protected methods1816.22%
▷ Private methods43.60%
Functions20
▷ Named functions20100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants562.50%
▷ Class constants337.50%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/noimg.png2.52KB1.28KB▼ 49.20%