84% safe-paste

Code Review | Safe Paste

WordPress plugin Safe Paste scored84%from 54 tests.

About plugin

  • Plugin page: safe-paste
  • Plugin version: 1.1.9
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.4
  • WordPress version: 6.3.1
  • First release: Sep 22, 2012
  • Latest release: Apr 10, 2020
  • Number of updates: 16
  • Update frequency: every 172.3 days
  • Top authors: samuelaguilera (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

200+ active /4,280 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
This plugin's installer ran successfully

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

Server-side resources used by Safe Paste
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.53 ▼4.51
Dashboard /wp-admin3.31 ▲0.0147.05 ▼7.61
Posts /wp-admin/edit.php3.37 ▲0.0148.17 ▼1.77
Add New Post /wp-admin/post-new.php5.90 ▲0.0193.99 ▼7.12
Media Library /wp-admin/upload.php3.24 ▲0.0135.63 ▲0.47

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Safe Paste
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.28 ▼0.101.68 ▲0.0940.43 ▼3.14
Dashboard /wp-admin2,192 ▲155.54 ▲0.0184.55 ▼8.3241.83 ▼5.68
Posts /wp-admin/edit.php2,100 ▲32.02 ▲0.0541.90 ▲3.0835.99 ▼5.49
Add New Post /wp-admin/post-new.php1,528 ▲222.97 ▼0.28662.27 ▼1.7046.95 ▼13.53
Media Library /wp-admin/upload.php1,397 ▼34.35 ▲0.1999.81 ▼1.7341.67 ▼3.74

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following 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
    • theysaidso_admin_options
    • widget_recent-posts
    • 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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/safe-paste/safe-paste.php:101

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: tinymce, wysiwyg, post content, html, strip tags...

safe-paste/safe-paste.php 92% from 13 tests

"Safe Paste" version 1.1.9's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Description: The description should be shorter than 140 characters (currently 149 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected47 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1183647

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected