84% scratchpad

Code Review | Scratchpad

WordPress plugin Scratchpad scored 84% from 54 tests.

About plugin

  • Plugin page: scratchpad
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.2
  • WordPress version: 6.3.1
  • First release: Mar 7, 2015
  • Latest release: Mar 7, 2015
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: jk2228 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,096 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.78ms] Passed 4 tests

A check of server-side resources used by Scratchpad
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0143.27 ▼5.93
Dashboard /wp-admin3.32 ▲0.0243.41 ▼8.07
Posts /wp-admin/edit.php3.37 ▲0.0143.73 ▲0.22
Add New Post /wp-admin/post-new.php5.90 ▲0.0284.84 ▼1.32
Media Library /wp-admin/upload.php3.24 ▲0.0138.71 ▲6.50

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Scratchpad
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,811 ▲6513.61 ▼0.761.75 ▼0.6241.91 ▼4.75
Dashboard /wp-admin2,217 ▲265.91 ▼0.06102.40 ▼4.0740.66 ▼4.55
Posts /wp-admin/edit.php2,105 ▲132.08 ▲0.0541.44 ▲6.2433.01 ▲0.16
Add New Post /wp-admin/post-new.php1,374 ▼16018.86 ▼4.17510.71 ▼108.1730.76 ▼18.45
Media Library /wp-admin/upload.php1,398 ▲104.27 ▲0.05102.84 ▲0.4841.61 ▼2.78

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not 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 server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/scratchpad/scratchpad.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% 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
Attributes that need to be fixed:
  • Screenshots: Add an image for screenshot #1 (Scratchpad in use with a new post.)
You can take inspiration from this readme.txt

scratchpad/scratchpad.php Passed 13 tests

The principal PHP file in "Scratchpad" v. 0.1 is loaded by WordPress automatically on each request
71 characters long description:
Scratchpad to assist composing a new post, displayed next to the editor

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin955 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript121277891
PHP1222444
CSS13020

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.46
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
Namespaces0
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.56MB with 0.27MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/notepad.png63.38KB37.81KB▼ 40.34%
assets/screenshot-1.png508.89KB225.90KB▼ 55.61%