10% ns-widget-recent-comments

Code Review | NS Widget Recent Comments

WordPress plugin NS Widget Recent Comments scored10%from 54 tests.

About plugin

  • Plugin page: ns-widget-recent-...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.4.2
  • WordPress version: 6.3.1
  • First release: Oct 29, 2014
  • Latest release: Apr 13, 2016
  • Number of updates: 18
  • Update frequency: every 29.6 days
  • Top authors: misharnet (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

80+ active /2,822 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/ns-widget-recent-comments/widget-recent-comments.php+31
    Methods with the same name as their class will not be constructors in a future version of PHP; NS_Recent_Comments_ has a deprecated constructor

Server metrics [RAM: ▼1.91MB] [CPU: ▼53.38ms] Passed 4 tests

A check of server-side resources used by NS Widget Recent Comments
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.385.32 ▼32.83
Dashboard /wp-admin2.10 ▼1.246.29 ▼52.28
Posts /wp-admin/edit.php2.11 ▼1.255.90 ▼40.44
Add New Post /wp-admin/post-new.php2.11 ▼3.786.53 ▼87.95
Media Library /wp-admin/upload.php2.11 ▼1.125.92 ▼28.06

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: 6 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_ns-recent-comments
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by NS Widget Recent Comments
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.36 ▼0.201.72 ▲0.2844.28 ▲3.71
Dashboard /wp-admin2,195 ▲185.54 ▼0.0381.25 ▼5.9938.01 ▼7.23
Posts /wp-admin/edit.php2,100 ▼02.00 ▲0.0234.33 ▼6.2431.31 ▼9.72
Add New Post /wp-admin/post-new.php1,526 ▼323.28 ▲0.30591.25 ▼22.4551.19 ▲5.01
Media Library /wp-admin/upload.php1,400 ▼04.27 ▲0.0993.79 ▼3.2141.08 ▼1.80

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/ns-widget-recent-comments/widget-recent-comments.php+31
    Methods with the same name as their class will not be constructors in a future version of PHP; NS_Recent_Comments_ has a deprecated constructor
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_ns-recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ns-widget-recent-comments/widget-recent-comments.php:15

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 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
7 plugin tags: avatar, comments, recent comments, netscripter, free...

ns-widget-recent-comments/widget-recent-comments.php 85% from 13 tests

The entry point to "NS Widget Recent Comments" version 1.2 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: The principal plugin file should be the same as the plugin slug ("ns-widget-recent-comments.php" instead of "widget-recent-comments.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin124 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1291091
CSS14333

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity3.33
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.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

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin