94% new-page-comments

Code Review | New Page Comments

WordPress plugin New Page Comments scored 94% from 54 tests.

About plugin

  • Plugin page: new-page-comments
  • Plugin version: 0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.5.1
  • WordPress version: 5.8.1
  • First release: Aug 27, 2019
  • Latest release: Sep 26, 2020
  • Number of updates: 10
  • Update frequency: every 39.8 days
  • Top authors: ajku99 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 378 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.13MB] [CPU: ▼131.81ms] Passed 4 tests

This is a short check of server-side resources used by New Page Comments
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.92 ▲0.2044.98 ▲23.39
Dashboard /wp-admin3.18 ▲0.1343.72 ▲1.37
Posts /wp-admin/edit.php3.28 ▲0.1760.30 ▲22.91
Add New Post /wp-admin/post-new.php5.54 ▲0.10106.60 ▼562.83
Media Library /wp-admin/upload.php3.12 ▲0.1247.61 ▲11.31
New page comment /wp-admin/options-general.php?page=new-page-comment3.0938.74

Server storage [IO: ▲0.05MB] [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: 16 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for New Page Comments
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,708 ▲11216.23 ▲0.3612.30 ▲3.1547.14 ▼3.72
Dashboard /wp-admin2,978 ▲475.90 ▼0.17147.01 ▼6.67119.36 ▼7.38
Posts /wp-admin/edit.php2,744 ▲52.69 ▼0.0066.84 ▼8.6599.38 ▼0.40
Add New Post /wp-admin/post-new.php1,686 ▲318.36 ▼0.06405.91 ▲18.15113.79 ▼2.16
Media Library /wp-admin/upload.php1,812 ▲25.00 ▼0.02167.38 ▲10.23125.85 ▼1.33
New page comment /wp-admin/options-general.php?page=new-page-comment1,1762.4968.4373.98

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
No output text or server-side errors detected on direct access of PHP files

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following browser errors
    • > GET request to /wp-admin/options-general.php?page=new-page-comment
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.8.1 1:31592 "jQuery.Deferred exception: $ is not a function" "TypeError: $ is not a function\n at commentOption (/wp-content/plugins/new-page-comments/assets/admin-main.js?ver=0.3:77:13)\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/new-page-comments/assets/admin-main.js?ver=0.3:69:5)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.8.1:2:30038)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.8.1:2:30340)" undefined
    • > GET request to /wp-admin/options-general.php?page=new-page-comment
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.8.1 1:31702 Uncaught TypeError: $ is not a function

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Post page with Comment button), #2 (Comment page with comment list)
The official readme.txt might help

new-page-comments/new-page-comments.php Passed 13 tests

"New Page Comments" version 0.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
91 characters long description:
Show comments section in new page or load when user wants to see. Reduce load time process.

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
Success! There were no dangerous files found in this plugin640 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP76646491
JavaScript26194
CSS22352
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 complexity22.00
▷ Minimum class complexity9.00
▷ Maximum class complexity35.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods28
▷ Static methods13.57%
▷ Public methods28100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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 files were detected