84% featuring-countcomments

Code Review | Featuring CountComments

WordPress plugin Featuring CountComments scored84%from 54 tests.

About plugin

  • Plugin page: featuring-countco...
  • Plugin version: 1.64
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.9
  • WordPress version: 6.3.1
  • First release: Mar 24, 2007
  • Latest release: Nov 9, 2017
  • Number of updates: 76
  • Update frequency: every 51.1 days
  • Top authors: neoxx (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /6,976 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.29MB] [CPU: ▲1.76ms] Passed 4 tests

A check of server-side resources used by Featuring CountComments
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.71 ▲0.2536.89 ▲2.24
Dashboard /wp-admin3.65 ▲0.3544.67 ▼0.14
Posts /wp-admin/edit.php3.70 ▲0.3545.90 ▼0.35
Add New Post /wp-admin/post-new.php6.17 ▲0.2890.13 ▲6.12
Media Library /wp-admin/upload.php3.51 ▲0.2839.40 ▲5.28
Featuring CountComments /wp-admin/options-general.php?page=featuring_countcomments3.4933.24

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

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

Browser metrics Passed 4 tests

Featuring CountComments: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲3614.30 ▼0.431.91 ▲0.2440.56 ▲0.61
Dashboard /wp-admin2,201 ▲275.62 ▼0.0891.30 ▲0.3239.55 ▼4.41
Posts /wp-admin/edit.php2,103 ▲61.99 ▲0.0539.73 ▼1.4735.90 ▼3.75
Add New Post /wp-admin/post-new.php1,533 ▼223.14 ▲4.85677.04 ▲77.6155.95 ▼7.10
Media Library /wp-admin/upload.php1,409 ▲94.19 ▼0.1594.88 ▼2.0845.52 ▲2.59
Featuring CountComments /wp-admin/options-general.php?page=featuring_countcomments1,5421.7329.6346.76

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 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
The following issues need your attention
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/featuring-countcomments/uninstall.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/featuring-countcomments/featuring-countcomments.php:331

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (This screenshot shows the extended users table in the Admin Menu.), #2 (This picture presents an example widget output in the sidebar.), #3 (This screenshot depicts the Settings/Featuring CountComments Tab in the Admin Menu.)
  • Tags: There are too many tags (13 tag instead of maximum 10)
Please take inspiration from this readme.txt

featuring-countcomments/featuring-countcomments.php Passed 13 tests

The primary PHP file in "Featuring CountComments" version 1.64 is used by WordPress to initiate all plugin functionality
93 characters long description:
Counts the number of comments for each user who has been logged in at the time of commenting.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin1,005 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP2618763931
CSS19039
JavaScript291035

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity74.50
▷ Minimum class complexity10.00
▷ Maximum class complexity139.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods88
▷ Static methods00.00%
▷ Public methods5663.64%
▷ Protected methods00.00%
▷ Private methods3236.36%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
3 PNG files occupy 0.07MB with 0.03MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png52.40KB21.88KB▼ 58.24%
screenshot-1.png20.50KB10.03KB▼ 51.08%
screenshot-2.png1.80KB1.26KB▼ 29.67%