84% wp-grade-comments

Code Review | WP Grade Comments

WordPress plugin WP Grade Comments scored84%from 54 tests.

About plugin

  • Plugin page: wp-grade-comments
  • Plugin version: 1.5.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.2
  • WordPress version: 6.3.1
  • First release: Feb 17, 2016
  • Latest release: Jul 28, 2023
  • Number of updates: 32
  • Update frequency: every 84.9 days
  • Top authors: boonebgorges (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

80+ active /4,055 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼5.17ms] Passed 4 tests

Server-side resources used by WP Grade Comments
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0335.73 ▼5.43
Dashboard /wp-admin3.34 ▼0.0148.78 ▼14.11
Posts /wp-admin/edit.php3.39 ▲0.0447.21 ▲3.35
Add New Post /wp-admin/post-new.php5.92 ▲0.0385.39 ▼1.27
Media Library /wp-admin/upload.php3.26 ▲0.0336.03 ▲0.13

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
can_compress_scripts
olgc_notice_dismissed
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for WP Grade Comments
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲8414.38 ▲0.021.86 ▲0.0839.02 ▼1.13
Dashboard /wp-admin2,211 ▲305.63 ▼0.0396.59 ▼5.9343.17 ▲5.62
Posts /wp-admin/edit.php2,126 ▲232.12 ▲0.1335.52 ▼0.9535.58 ▼2.06
Add New Post /wp-admin/post-new.php1,542 ▲1623.55 ▼0.11639.68 ▼26.2757.28 ▼5.83
Media Library /wp-admin/upload.php1,416 ▲164.15 ▼0.0096.12 ▼4.7845.35 ▲0.10

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • olgc_notice_dismissed
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

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 | 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
Please fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-grade-comments/includes/admin.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-grade-comments/wp-grade-comments.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
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 an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
4 plugin tags: privacy, comments, course, grade

wp-grade-comments/wp-grade-comments.php Passed 13 tests

The main PHP script in "WP Grade Comments" version 1.5.0 is automatically included on every request by WordPress
86 characters long description:
Grades and private comments for WordPress blog posts. Built for the City Tech OpenLab.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected677 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP2124276524
JavaScript217995
CSS213050
Markdown1608

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.55
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%
Functions30
▷ Named functions30100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
There were not PNG files found in your plugin