74% comment-approved

Code Review | Comment Approved

WordPress plugin Comment Approved scored74%from 54 tests.

About plugin

  • Plugin page: comment-approved
  • Plugin version: 1.6.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.9.8
  • WordPress version: 6.3.1
  • First release: Aug 26, 2014
  • Latest release: Nov 20, 2018
  • Number of updates: 40
  • Update frequency: every 38.7 days
  • Top authors: nielsvanrenselaar (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

1,000+ active /19,479 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▼0.89MB] [CPU: ▼34.03ms] Passed 4 tests

An overview of server-side resources used by Comment Approved
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0742.92 ▲2.61
Dashboard /wp-admin3.05 ▼0.2528.92 ▼20.29
Posts /wp-admin/edit.php3.06 ▼0.3024.78 ▼35.99
Add New Post /wp-admin/post-new.php3.05 ▼2.8325.53 ▼69.99
Media Library /wp-admin/upload.php3.05 ▼0.1726.98 ▼9.86
Comment Approved /wp-admin/options-general.php?page=comment_approved-settings3.0626.59

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Comment Approved
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.41 ▼0.251.69 ▲0.0244.44 ▼2.14
Dashboard /wp-admin2,202 ▲255.62 ▼0.0591.31 ▲2.9542.98 ▲0.98
Posts /wp-admin/edit.php2,104 ▲42.02 ▲0.0437.29 ▼2.4736.15 ▼0.89
Add New Post /wp-admin/post-new.php1,541 ▲1518.22 ▼4.91636.53 ▲0.1462.38 ▲8.56
Media Library /wp-admin/upload.php1,407 ▲44.19 ▲0.0197.57 ▼13.5244.29 ▼2.92
Comment Approved /wp-admin/options-general.php?page=comment_approved-settings9281.9923.3227.54

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The plugin did not uninstall gracefully
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=comment_approved-settings
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

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 uses markdown syntax to describe your plugin to the world
5 plugin tags: approval, approved, message, comment, notification

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

"Comment Approved" version 1.6.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
45 characters long description:
Notify a user when their comment is approved.

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
Success! There were no dangerous files found in this plugin269 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP394145266
Markdown1103

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity31.00
▷ Minimum class complexity31.00
▷ Maximum class complexity31.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods18.33%
▷ Public methods1191.67%
▷ Protected methods18.33%
▷ 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
There are no PNG files in this plugin