84% comment-saver

Code Review | Comment Saver

WordPress plugin Comment Saver scored84%from 54 tests.

About plugin

  • Plugin page: comment-saver
  • Plugin version: 1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-6.2.2
  • WordPress version: 6.3.1
  • First release: May 27, 2008
  • Latest release: Jun 24, 2023
  • Number of updates: 24
  • Update frequency: every 229.4 days
  • Top authors: wnorris (79.17%)willnorris (25%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,036 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.00MB] [CPU: ▼8.11ms] Passed 4 tests

Analyzing server-side resources used by Comment Saver
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.52 ▲0.05
Dashboard /wp-admin3.31 ▼0.0345.53 ▼16.63
Posts /wp-admin/edit.php3.36 ▲0.0147.26 ▼4.67
Add New Post /wp-admin/post-new.php5.89 ▲0.0192.05 ▼7.12
Media Library /wp-admin/upload.php3.24 ▲0.0136.77 ▼4.01

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Comment Saver: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.34 ▼0.081.91 ▲0.0340.88 ▲0.35
Dashboard /wp-admin2,189 ▲95.61 ▼0.0094.34 ▼0.0842.07 ▲0.32
Posts /wp-admin/edit.php2,100 ▼02.04 ▲0.0643.11 ▲4.9936.35 ▼0.27
Add New Post /wp-admin/post-new.php1,526 ▼023.29 ▲0.23705.91 ▲9.5052.35 ▼8.33
Media Library /wp-admin/upload.php1,400 ▼04.16 ▼0.0594.36 ▼18.4640.84 ▼3.18

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
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

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
Everything seems fine, however this is by no means an exhaustive test

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 take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/comment-saver/comment-saver.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
1 plugin tags: comments

comment-saver/comment-saver.php Passed 13 tests

The primary PHP file in "Comment Saver" version 1.6 is used by WordPress to initiate all plugin functionality
64 characters long description:
Saves comment text in a temporary cookie before it is submitted.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin102 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript111034
JSON10032
PHP152527
XML1209

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin