83% paste-as-plain-text-by-default

Code Review | Paste As Plain Text By Default

WordPress plugin Paste As Plain Text By Default scored83%from 54 tests.

About plugin

  • Plugin page: paste-as-plain-te...
  • Plugin version: 1.1.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.3
  • WordPress version: 6.3.1
  • First release: Nov 17, 2021
  • Latest release: Aug 7, 2023
  • Number of updates: 13
  • Update frequency: every 48.4 days
  • Top authors: divimundo (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

1,000+ active /3,612 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.01MB] [CPU: ▼6.64ms] Passed 4 tests

Server-side resources used by Paste As Plain Text By Default
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0234.68 ▼8.81
Dashboard /wp-admin3.32 ▲0.0244.47 ▼3.73
Posts /wp-admin/edit.php3.37 ▲0.0145.19 ▼2.54
Add New Post /wp-admin/post-new.php5.90 ▲0.0192.37 ▼11.49
Media Library /wp-admin/upload.php3.24 ▲0.0136.54 ▼1.91

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Paste As Plain Text By Default
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.45 ▲0.161.69 ▼0.1238.15 ▼5.20
Dashboard /wp-admin2,203 ▲155.77 ▼0.1499.03 ▼13.1241.84 ▼3.69
Posts /wp-admin/edit.php2,089 ▼32.03 ▲0.0436.11 ▼0.5731.25 ▼0.90
Add New Post /wp-admin/post-new.php1,528 ▲718.37 ▼4.88601.60 ▼62.5764.58 ▲7.87
Media Library /wp-admin/upload.php1,385 ▼34.22 ▼0.0198.59 ▼10.5142.50 ▼1.86

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/paste-as-plain-text-by-default/paste-as-text-by-default.php:13

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Tags: Please delete some tags, you are using 13 tag instead of maximum 10
  • Plugin Name: Please specify the plugin name on the first line ( === paste-as-plain-text-by-default === )
Please take inspiration from this readme.txt

paste-as-plain-text-by-default/paste-as-text-by-default.php 92% from 13 tests

"Paste As Plain Text By Default" version 1.1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("paste-as-plain-text-by-default.php" instead of "paste-as-text-by-default.php")

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
Success! There were no dangerous files found in this plugin48 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP191348

PHP code Passed 2 tests

This is a short overview 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.45
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 functions125.00%
▷ Anonymous functions375.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin