83% user-count

Code Review | User Count

WordPress plugin User Count scored83%from 54 tests.

About plugin

  • Plugin page: user-count
  • Plugin version: .04...
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-3.7.1
  • WordPress version: 6.3.1
  • First release: Jul 21, 2009
  • Latest release: Dec 12, 2013
  • Number of updates: 33
  • Update frequency: every 48.6 days
  • Top authors: kirbtech (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,827 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

A check of server-side resources used by User Count
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.43 ▼1.91
Dashboard /wp-admin3.21 ▼0.1033.76 ▼12.72
Posts /wp-admin/edit.php3.37 ▲0.0146.91 ▼2.85
Add New Post /wp-admin/post-new.php5.90 ▲0.0190.43 ▲4.41
Media Library /wp-admin/upload.php3.24 ▲0.0133.52 ▲0.53

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

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

Browser metrics Passed 4 tests

User Count: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲8113.60 ▼1.194.37 ▲2.5641.00 ▼12.19
Dashboard /wp-admin2,222 ▲344.87 ▼1.03109.44 ▲1.5144.06 ▲2.77
Posts /wp-admin/edit.php2,092 ▲32.02 ▲0.0241.31 ▼0.7136.83 ▼0.01
Add New Post /wp-admin/post-new.php1,538 ▲2423.09 ▲5.54593.76 ▼101.7854.08 ▲0.79
Media Library /wp-admin/upload.php1,388 ▼04.20 ▼0.0495.60 ▼2.0543.78 ▼3.76

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not 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 items
  • 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/user-count/usercount.php:67

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% 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
Please fix the following attributes:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === user-count === )
You can take inspiration from this readme.txt

user-count/usercount.php 85% from 13 tests

"User Count" version .04...'s main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Version: The version number should only use digits and periods (ex. "1.0.3" instead of ".04...")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("user-count.php" instead of "usercount.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
Everything looks great! No dangerous files found in this plugin36 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1122136

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.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 are no PNG files in this plugin