79% expandable-dashboard-recent-comments

Code Review | Expandable Dashboard Recent Comments

WordPress plugin Expandable Dashboard Recent Comments scored79%from 54 tests.

About plugin

  • Plugin page: expandable-dashbo...
  • Plugin version: 2.8.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.8
  • WordPress version: 6.3.1
  • First release: Jun 11, 2009
  • Latest release: Sep 17, 2021
  • Number of updates: 28
  • Update frequency: every 160.5 days
  • Top authors: coffee2code (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

60+ active /9,501 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.00MB] [CPU: ▼7.88ms] Passed 4 tests

This is a short check of server-side resources used by Expandable Dashboard Recent Comments
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0037.96 ▼3.22
Dashboard /wp-admin3.32 ▼0.0344.38 ▼19.60
Posts /wp-admin/edit.php3.36 ▲0.0046.80 ▲2.52
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.70 ▼6.62
Media Library /wp-admin/upload.php3.23 ▲0.0030.46 ▼2.06

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Expandable Dashboard Recent Comments
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,846 ▲7514.45 ▼0.151.72 ▼0.1640.34 ▼2.76
Dashboard /wp-admin2,255 ▲704.88 ▼0.94109.70 ▼2.4945.27 ▲2.67
Posts /wp-admin/edit.php2,089 ▼02.02 ▲0.0338.76 ▼1.9835.10 ▲0.65
Add New Post /wp-admin/post-new.php1,533 ▼023.46 ▲0.37654.42 ▼26.8752.90 ▼2.19
Media Library /wp-admin/upload.php1,388 ▼04.22 ▲0.01101.94 ▲3.7544.60 ▲1.29

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 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
Please take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/expandable-dashboard-recent-comments/tests/phpunit/bootstrap.php
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      require_once(): Failed opening required '/tmp/wordpress-tests-lib/tests/phpunit/includes/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/expandable-dashboard-recent-comments/tests/phpunit/bootstrap.php on line 29
    • > PHP Warning
      require_once(/tmp/wordpress-tests-lib/tests/phpunit/includes/functions.php): failed to open stream: No such file or directory in wp-content/plugins/expandable-dashboard-recent-comments/tests/phpunit/bootstrap.php on line 29

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

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
7 plugin tags: expandable, excerpt, admin, comment, coffee2code...

expandable-dashboard-recent-comments/expandable-dashboard-recent-comments.php Passed 13 tests

The main PHP script in "Expandable Dashboard Recent Comments" version 2.8.2 is automatically included on every request by WordPress
128 characters long description:
Enables in-place expansion of excerpts in the admin dashboard 'Comments' section of the 'Activity' widget to view full comments.

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
Success! There were no dangerous files found in this plugin789 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP4165213409
Markdown3460235
JavaScript1181268
CSS10042
Bourne Shell16221
XML10014

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity6.00
▷ Minimum class complexity1.00
▷ Maximum class complexity15.00
Average method complexity1.27
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods56
▷ Static methods1628.57%
▷ Public methods5394.64%
▷ Protected methods35.36%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
No PNG images were found in this plugin