10% acb-scratchpad

Code Review | Code Block ScratchPad

WordPress plugin Code Block ScratchPad scored 10% 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: 5.9.2
  • 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 / 295 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • Install 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

Server metrics [RAM: ▼2.29MB] [CPU: ▼347.32ms] Passed 4 tests

Analyzing server-side resources used by Code Block ScratchPad
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.434.77 ▼49.67
Dashboard /wp-admin2.10 ▼1.314.87 ▼33.33
Posts /wp-admin/edit.php2.10 ▼1.545.60 ▼42.38
Add New Post /wp-admin/post-new.php2.10 ▼4.874.58 ▼1,263.89
Media Library /wp-admin/upload.php2.10 ▼1.193.98 ▼24.23

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Code Block ScratchPad
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,932 ▲17817.53 ▲2.159.14 ▲3.322.39 ▼0.51
Dashboard /wp-admin2,929 ▲687.32 ▲1.04122.39 ▼16.62153.20 ▼10.81
Posts /wp-admin/edit.php2,739 ▲453.86 ▲0.6368.55 ▲4.82212.25 ▲65.53
Add New Post /wp-admin/post-new.php1,698 ▼8116.74 ▼5.45418.55 ▼8.66164.51 ▲2.97
Media Library /wp-admin/upload.php1,747 ▲496.60 ▲1.07131.90 ▼18.84189.07 ▲0.96

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • 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

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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > 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 shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Requires php: The plugin version is formatted incorrectly
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
You can look at the official readme.txt

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

The main file in "Code Block ScratchPad" v. 1.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
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 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable 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

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
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

All PNG images should be compressed to minimize bandwidth usage for end users
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%