83% scratchblocks-for-wp

Code Review | scratchblocks for WP

WordPress plugin scratchblocks for WP scored83%from 54 tests.

About plugin

  • Plugin page: scratchblocks-for-wp
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 1.0.1-4.0.1
  • WordPress version: 6.3.1
  • First release: Dec 23, 2014
  • Latest release: Dec 23, 2014
  • Number of updates: 8
  • Update frequency: every 0.1 days
  • Top authors: tkc49 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /867 total downloads

Benchmarks

Plugin footprint 83% from 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.00MB] [CPU: ▼9.37ms] Passed 4 tests

An overview of server-side resources used by scratchblocks for WP
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.53 ▼9.72
Dashboard /wp-admin3.31 ▼0.0348.66 ▼14.23
Posts /wp-admin/edit.php3.36 ▲0.0150.10 ▼1.56
Add New Post /wp-admin/post-new.php5.89 ▲0.0192.04 ▼11.96
Media Library /wp-admin/upload.php3.24 ▲0.0137.81 ▲4.25

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

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

Browser metrics Passed 4 tests

A check of browser resources used by scratchblocks for WP
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,900 ▲13913.57 ▼0.6111.81 ▲10.1541.98 ▼0.55
Dashboard /wp-admin2,198 ▲185.55 ▼0.1284.91 ▼5.3741.64 ▼1.13
Posts /wp-admin/edit.php2,097 ▼32.01 ▲0.0633.77 ▼7.2237.94 ▼0.09
Add New Post /wp-admin/post-new.php1,526 ▼223.12 ▲0.13686.14 ▲45.5952.91 ▲0.77
Media Library /wp-admin/upload.php1,403 ▲64.20 ▼0.0294.03 ▼13.9950.85 ▲5.50

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/scratchblocks-for-wp/scratchblocks-for-wp.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Contributors: Contributors not specified
  • Contributors: No tags were detected
The official readme.txt might help

scratchblocks-for-wp/scratchblocks-for-wp.php 85% from 13 tests

The main PHP script in "scratchblocks for WP" version 1.0.1 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Description: The plugin description must be longer than 10 characters (currently 0 characters long)
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin1,334 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
CSS10271,266
PHP1121167
JavaScript1081

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.00
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%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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