84% paste-as-plain-text

Code Review | Paste as Plain Text

WordPress plugin Paste as Plain Text scored84%from 54 tests.

About plugin

  • Plugin page: paste-as-plain-text
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.9
  • WordPress version: 6.3.1
  • First release: Apr 21, 2013
  • Latest release: Nov 9, 2017
  • Number of updates: 22
  • Update frequency: every 75.6 days
  • Top authors: tillkruess (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

2,000+ active /11,485 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

Server-side resources used by Paste as Plain Text
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.55 ▼3.33
Dashboard /wp-admin3.32 ▲0.0247.75 ▼2.76
Posts /wp-admin/edit.php3.37 ▲0.0148.36 ▲1.47
Add New Post /wp-admin/post-new.php5.90 ▲0.0185.05 ▼9.52
Media Library /wp-admin/upload.php3.24 ▲0.0138.71 ▲4.24

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Paste as Plain Text: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4314.48 ▼0.101.79 ▼0.3041.08 ▼5.21
Dashboard /wp-admin2,209 ▲214.90 ▼1.0198.89 ▼16.2339.83 ▼4.78
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0635.22 ▼5.0232.63 ▼1.33
Add New Post /wp-admin/post-new.php1,514 ▼517.41 ▼5.56683.33 ▲12.7555.41 ▼6.33
Media Library /wp-admin/upload.php1,388 ▼34.21 ▼0.00104.16 ▲5.3847.20 ▲0.29

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/paste-as-plain-text/paste-as-plain-text.php:37

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
7 plugin tags: tinymce, plain text, paste, formatting, mce...

paste-as-plain-text/paste-as-plain-text.php Passed 13 tests

The principal PHP file in "Paste as Plain Text" v. 1.0.1 is loaded by WordPress automatically on each request
62 characters long description:
Forces the WordPress editor to paste everything as plain text.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected32 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1212932

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.40
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.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
No PNG files were detected