84% fox009-recent-comments-widget

Code Review | Fox009 Recent Comments Widget

WordPress plugin Fox009 Recent Comments Widget scored84%from 54 tests.

About plugin

  • Plugin page: fox009-recent-com...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-5.7
  • WordPress version: 6.3.1
  • First release: May 25, 2021
  • Latest release: May 25, 2021
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: fox009 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /309 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

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

Analyzing server-side resources used by Fox009 Recent Comments Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.65 ▲2.44
Dashboard /wp-admin3.32 ▲0.0245.31 ▼1.96
Posts /wp-admin/edit.php3.37 ▲0.0246.30 ▼2.00
Add New Post /wp-admin/post-new.php5.90 ▲0.0284.24 ▼5.60
Media Library /wp-admin/upload.php3.24 ▲0.0234.28 ▲2.30

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
widget_fox009_recent_comments_widget
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Fox009 Recent Comments Widget
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.67 ▼0.701.74 ▲0.0743.39 ▼5.83
Dashboard /wp-admin2,206 ▲185.81 ▲0.94107.10 ▼8.8141.71 ▼1.74
Posts /wp-admin/edit.php2,089 ▲181.97 ▼0.0837.75 ▲1.9534.39 ▼0.37
Add New Post /wp-admin/post-new.php1,514 ▼517.65 ▼5.55703.19 ▲16.9849.30 ▼12.32
Media Library /wp-admin/upload.php1,388 ▼04.21 ▼0.0494.72 ▼20.8442.82 ▼5.62

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_fox009_recent_comments_widget
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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 fix the following
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/fox009-recent-comments-widget/includes/select_options.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/fox009-recent-comments-widget/includes/widget.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_parse_args() in wp-content/plugins/fox009-recent-comments-widget/includes/form.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/fox009-recent-comments-widget/fox009-comments-widget.php:11

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 on the user side

Optimizations

Plugin configuration 96% 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
5 plugin tags: recent comments, comments, fox009, widget, avatar

fox009-recent-comments-widget/fox009-comments-widget.php 92% from 13 tests

Analyzing the main PHP file in "Fox009 Recent Comments Widget" version 1.0.0
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("fox009-recent-comments-widget.php" instead of "fox009-comments-widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected507 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP4388437
CSS111050
JavaScript13020

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity21.00
▷ Minimum class complexity21.00
▷ Maximum class complexity21.00
Average method complexity2.43
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods750.00%
▷ Protected methods00.00%
▷ Private methods750.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin