89% website-screenshot

Code Review | Website screenshot blocks for Gutenberg

WordPress plugin Website screenshot blocks for Gutenberg scored 89% from 54 tests.

About plugin

  • Plugin page: website-screenshot
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.8
  • WordPress version: 5.8.1
  • First release: Oct 17, 2018
  • Latest release: Oct 23, 2018
  • Number of updates: 7
  • Update frequency: every 1.0 days
  • Top authors: FameThemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 433 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.09MB] [CPU: ▼146.55ms] Passed 4 tests

This is a short check of server-side resources used by Website screenshot blocks for Gutenberg
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.93 ▲0.0933.14 ▲0.62
Dashboard /wp-admin3.15 ▲0.0936.49 ▼14.76
Posts /wp-admin/edit.php3.20 ▲0.0946.49 ▲1.05
Add New Post /wp-admin/post-new.php5.51 ▲0.0787.57 ▼571.42
Media Library /wp-admin/upload.php3.09 ▲0.0932.56 ▼0.64
Website Screenshot /wp-admin/options-general.php?page=website-screenshot3.0431.72

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 27 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Website screenshot blocks for Gutenberg
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,684 ▲7815.92 ▼0.019.22 ▼1.4247.14 ▼0.83
Dashboard /wp-admin2,972 ▲355.91 ▼0.06153.97 ▼0.98110.06 ▼2.39
Posts /wp-admin/edit.php2,744 ▲52.73 ▲0.0069.21 ▲0.1996.76 ▲10.34
Add New Post /wp-admin/post-new.php1,684 ▲18421.75 ▲2.83445.39 ▲33.72110.02 ▼5.23
Media Library /wp-admin/upload.php1,827 ▲175.01 ▼0.02163.59 ▼6.24117.59 ▼4.15
Website Screenshot /wp-admin/options-general.php?page=website-screenshot1,3732.1254.5771.59

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=website-screenshot
    • > Notice in wp-content/plugins/website-screenshot/lib/settings.php+140
    Undefined index: waitUntilSelector

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WS\\Blocks\\add_action() in wp-content/plugins/website-screenshot/lib/enqueue-scripts.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WS\\Blocks\\Website_Screenshot\\add_action() in wp-content/plugins/website-screenshot/blocks/website-screenshot/index.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WS\\Blocks\\add_action() in wp-content/plugins/website-screenshot/lib/settings.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
3 plugin tags: website screenshot, screenshot, screenshotbin

website-screenshot/website-screenshot.php Passed 13 tests

The primary PHP file in "Website screenshot blocks for Gutenberg" version 1.0.0 is used by WordPress to initiate all plugin functionality
42 characters long description:
Website screenshot using screenshotbin API

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected9,336 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
JSON2008,102
JavaScript1315542670
PHP487103416
SVG10176
Sass211070
CSS2002

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods125.00%
▷ Public methods375.00%
▷ Protected methods00.00%
▷ Private methods125.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin