10% acb-scratchpad

Code Review | Code Block ScratchPad

WordPress plugin Code Block ScratchPad scored10%from 54 tests.

About plugin

  • Plugin page: acb-scratchpad
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.4.2
  • WordPress version: 6.3.1
  • First release: Aug 21, 2020
  • Latest release: Nov 25, 2020
  • Number of updates: 6
  • Update frequency: every 16.2 days
  • Top authors: acerby (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /616 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/acb-scratchpad/acb-scratchpad.php+858
    The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence

Server metrics [RAM: ▼1.71MB] [CPU: ▼50.45ms] Passed 4 tests

This is a short check of server-side resources used by Code Block ScratchPad
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.28 ▼1.194.61 ▼40.28
Dashboard /wp-admin2.30 ▼1.016.52 ▼43.58
Posts /wp-admin/edit.php2.30 ▼1.067.35 ▼37.52
Add New Post /wp-admin/post-new.php2.30 ▼3.597.80 ▼80.43
Media Library /wp-admin/upload.php2.30 ▼0.945.90 ▼28.52

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

How much does this plugin use your filesystem and database?
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
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Code Block ScratchPad
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,924 ▲17814.57 ▲0.284.47 ▲2.4039.08 ▼0.20
Dashboard /wp-admin2,249 ▲645.82 ▼0.04117.14 ▲14.6044.42 ▼0.67
Posts /wp-admin/edit.php2,135 ▲462.77 ▲0.7243.22 ▲3.6036.22 ▼3.39
Add New Post /wp-admin/post-new.php1,563 ▲2118.80 ▲0.49602.60 ▼14.5935.07 ▼19.75
Media Library /wp-admin/upload.php1,428 ▲495.17 ▲0.95101.02 ▼2.7641.41 ▼3.43

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
    • > Deprecated in wp-content/plugins/acb-scratchpad/acb-scratchpad.php+858
    The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

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)
The smoke test was a success, however most plugin functionality was not tested

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 items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/acb-scratchpad/acb-scratchpad.php:878

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Requires php: Version format is invalid
  • Tags: You are using too many tags: 11 tag instead of maximum 10
Please take inspiration from this readme.txt

acb-scratchpad/acb-scratchpad.php Passed 13 tests

"Code Block ScratchPad" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
123 characters long description:
A simple scratchpad/testbed for testing, and installing small additions to, pre-existing PHP/JS/CSS website/addin-code code

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin657 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP1129159594
JavaScript31258
CSS2015
LESS1010

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
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
Interfaces1
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions20
▷ Named functions1785.00%
▷ Anonymous functions315.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.07MB with 0.04MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot.png70.11KB28.70KB▼ 59.06%