90% total-user-count-shortcode

Code Review | Total User Count Shortcode

WordPress plugin Total User Count Shortcode scored90%from 54 tests.

About plugin

  • Plugin page: total-user-count-...
  • Plugin version: 1.1.1
  • PHP compatiblity: 5.7+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2
  • WordPress version: 6.3.1
  • First release: Jun 8, 2018
  • Latest release: Mar 29, 2023
  • Number of updates: 20
  • Update frequency: every 87.8 days
  • Top authors: morganhvidt (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

400+ active /3,729 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼7.55ms] Passed 4 tests

Server-side resources used by Total User Count Shortcode
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.35 ▼7.10
Dashboard /wp-admin3.31 ▲0.0048.60 ▼8.04
Posts /wp-admin/edit.php3.36 ▲0.0049.57 ▼2.66
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.00 ▼12.38
Media Library /wp-admin/upload.php3.23 ▲0.0037.81 ▲0.44

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Total User Count Shortcode
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.38 ▼0.061.80 ▼0.1746.47 ▲1.35
Dashboard /wp-admin2,192 ▲155.57 ▼0.0789.06 ▼2.6045.17 ▲3.37
Posts /wp-admin/edit.php2,100 ▼02.02 ▼0.0133.90 ▼0.9135.10 ▼1.40
Add New Post /wp-admin/post-new.php1,554 ▲2823.31 ▲5.71668.14 ▲26.7858.43 ▲3.17
Media Library /wp-admin/upload.php1,400 ▼04.22 ▼0.03101.18 ▼2.4547.74 ▲1.59

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
9 plugin tags: user count, total users, amount of users, count, total user count...

total-user-count-shortcode/total-user-count-shortcode.php Passed 13 tests

"Total User Count Shortcode" version 1.1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
120 characters long description:
Display the total amount of users in your WP with the [total_user_count] shortcode. [total_user_count role="subscriber"]

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin26 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP291526

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.60
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin