10% web-shrinker-web-site-preview-link-thumbnails

Code Review | Web Shrinker - Website Link Preview Thumbnails

WordPress plugin Web Shrinker - Website Link Preview Thumbnails scored 10% from 54 tests.

About plugin

  • Plugin page: web-shrinker-web-...
  • Plugin version: 2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9-4.8.2
  • WordPress version: 5.9.2
  • First release: Oct 12, 2012
  • Latest release: Nov 14, 2017
  • Number of updates: 18
  • Update frequency: every 103.3 days
  • Top authors: webshrinker (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

50+ active / 5,837 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Warning in wp-content/plugins/web-shrinker-web-site-preview-link-thumbnails/webshrinker.php+17
    Use of undefined constant WEBSHRINKER_DB_TABLE - assumed 'WEBSHRINKER_DB_TABLE' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼2.41MB] [CPU: ▼345.52ms] Passed 4 tests

Analyzing server-side resources used by Web Shrinker - Website Link Preview Thumbnails
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /1.96 ▼1.565.51 ▼45.43
Dashboard /wp-admin1.98 ▼1.435.37 ▼29.20
Posts /wp-admin/edit.php1.98 ▼1.664.52 ▼36.16
Add New Post /wp-admin/post-new.php1.98 ▼4.994.58 ▼1,271.29
Media Library /wp-admin/upload.php1.98 ▼1.325.18 ▼21.17
Web Shrinker /wp-admin/options-general.php?page=web-shrinker-web-site-preview-link-thumbnails/webshrinker.php1.986.17

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 4 new files
Database: 1 new table, 1 new option
New tables
wp_webshrinker
New WordPress options
webshrinker_version

Browser metrics Passed 4 tests

Checking browser requirements for Web Shrinker - Website Link Preview Thumbnails
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,836 ▲9416.23 ▲0.9714.94 ▲7.8818.26 ▲16.01
Dashboard /wp-admin2,879 ▲226.12 ▼0.15124.52 ▼1.47188.64 ▲19.68
Posts /wp-admin/edit.php2,693 ▲23.24 ▼0.0164.42 ▼0.83145.92 ▼3.65
Add New Post /wp-admin/post-new.php1,755 ▲320.88 ▼0.87463.78 ▲25.61178.25 ▼0.59
Media Library /wp-admin/upload.php1,700 ▲55.52 ▼0.00150.90 ▼11.50229.37 ▲22.00
Web Shrinker /wp-admin/options-general.php?page=web-shrinker-web-site-preview-link-thumbnails/webshrinker.php1,1832.4055.99135.42

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Warning in wp-content/plugins/web-shrinker-web-site-preview-link-thumbnails/webshrinker.php+17
    Use of undefined constant WEBSHRINKER_DB_TABLE - assumed 'WEBSHRINKER_DB_TABLE' (this will throw an Error in a future version of PHP)

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=web-shrinker-web-site-preview-link-thumbnails/webshrinker.php
    • > Warning in wp-content/plugins/web-shrinker-web-site-preview-link-thumbnails/webshrinker.php+17
    Use of undefined constant WEBSHRINKER_DB_TABLE - assumed 'WEBSHRINKER_DB_TABLE' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/options-general.php?page=web-shrinker-web-site-preview-link-thumbnails/webshrinker.php
    • > Warning in wp-content/plugins/web-shrinker-web-site-preview-link-thumbnails/webshrinker.php+18
    Use of undefined constant WEBSHRINKER_VERSION - assumed 'WEBSHRINKER_VERSION' (this will throw an Error in a future version of PHP)

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/web-shrinker-web-site-preview-link-thumbnails/webshrinker.php on line 17
    • > PHP Warning
      Use of undefined constant WEBSHRINKER_VERSION - assumed 'WEBSHRINKER_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/web-shrinker-web-site-preview-link-thumbnails/webshrinker.php on line 18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/web-shrinker-web-site-preview-link-thumbnails/webshrinker.php:290
    • > PHP Warning
      Use of undefined constant WEBSHRINKER_DB_TABLE - assumed 'WEBSHRINKER_DB_TABLE' (this will throw an Error in a future version of PHP) in wp-content/plugins/web-shrinker-web-site-preview-link-thumbnails/webshrinker.php on line 17

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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
9 plugin tags: web shrinker, website thumbnail, websnapr, webshrinker, thumbnail...

web-shrinker-web-site-preview-link-thumbnails/webshrinker.php 92% from 13 tests

The main file in "Web Shrinker - Website Link Preview Thumbnails" v. 2.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("web-shrinker-web-site-preview-link-thumbnails.php" instead of "webshrinker.php")

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 plugin1,511 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP22522781,508
Markdown1103

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity164.50
▷ Minimum class complexity131.00
▷ Maximum class complexity198.00
Average method complexity4.85
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods85
▷ Static methods11.18%
▷ Public methods6981.18%
▷ Protected methods1618.82%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants23
▷ Global constants23100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin