84% sketch

Code Review | Sketch Block

WordPress plugin Sketch Block scored 84% from 54 tests.

About plugin

  • Plugin page: sketch
  • Plugin version: 1.3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.1.1
  • WordPress version: 6.3.1
  • First release: Jul 1, 2021
  • Latest release: Mar 4, 2023
  • Number of updates: 24
  • Update frequency: every 25.5 days
  • Top authors: oskosk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 3,259 total downloads

Benchmarks

Plugin footprint 83% 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: ▲0.03MB] [CPU: ▼1.06ms] Passed 4 tests

This is a short check of server-side resources used by Sketch Block
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0440.46 ▼1.33
Dashboard /wp-admin3.33 ▲0.0347.19 ▼2.00
Posts /wp-admin/edit.php3.38 ▲0.0348.98 ▲2.51
Add New Post /wp-admin/post-new.php5.91 ▲0.0393.43 ▼3.40
Media Library /wp-admin/upload.php3.25 ▲0.0335.73 ▲3.19

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Sketch Block
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲9213.23 ▼1.141.98 ▲0.3743.43 ▲2.97
Dashboard /wp-admin2,209 ▲215.08 ▲0.21108.23 ▼0.9340.77 ▼0.86
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0439.16 ▼1.2031.52 ▼4.17
Add New Post /wp-admin/post-new.php6,415 ▲4,89621.08 ▼2.28889.54 ▲259.7963.77 ▲6.67
Media Library /wp-admin/upload.php1,388 ▼34.21 ▼0.0699.77 ▲2.9442.98 ▼1.65

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

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
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sketch/index.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Automattic\\A8c\\Plugins\\Blocks\\Sketch\\add_action() in wp-content/plugins/sketch/blocks/sketch.php:95

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: drawing, freehand, sketch, block, blocks

sketch/index.php 85% from 13 tests

The main PHP script in "Sketch Block" version 1.3.0 is automatically included on every request by WordPress
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 196 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("sketch.php" instead of "index.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
Success! There were no dangerous files found in this plugin133 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP32517104
CSS21419
JSON1009
JavaScript1001

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions360.00%
▷ Anonymous functions240.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin