84% posts-and-users-stats

Code Review | Posts and Users Stats

WordPress plugin Posts and Users Stats scored84%from 54 tests.

About plugin

  • Plugin page: posts-and-users-s...
  • Plugin version: 1.1.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.3
  • WordPress version: 6.3.1
  • First release: Sep 20, 2016
  • Latest release: Sep 12, 2023
  • Number of updates: 28
  • Update frequency: every 91.0 days
  • Top authors: patrickrobrecht (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

1,000+ active /9,339 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
Install script ran successfully

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

An overview of server-side resources used by Posts and Users Stats
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.87 ▼2.72
Dashboard /wp-admin3.34 ▲0.0352.77 ▼1.96
Posts /wp-admin/edit.php3.39 ▲0.0347.57 ▼11.96
Add New Post /wp-admin/post-new.php5.92 ▲0.0386.92 ▼22.04
Media Library /wp-admin/upload.php3.26 ▲0.0338.24 ▲2.38
Users Statistics /wp-admin/tools.php?page=posts_and_users_stats_users3.2733.19
Comments Statistics /wp-admin/tools.php?page=posts_and_users_stats_comments3.3236.49
Posts Statistics /wp-admin/tools.php?page=posts_and_users_stats_posts3.4739.19

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Posts and Users Stats
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,801 ▲1514.24 ▼0.311.70 ▼0.2841.06 ▼1.22
Dashboard /wp-admin2,210 ▲305.63 ▼0.0487.37 ▲0.3041.91 ▼2.58
Posts /wp-admin/edit.php2,112 ▲121.98 ▼0.0335.29 ▼6.1035.11 ▼5.86
Add New Post /wp-admin/post-new.php1,535 ▼023.03 ▲5.04640.89 ▼6.9150.93 ▼15.57
Media Library /wp-admin/upload.php1,415 ▲154.23 ▲0.05103.01 ▼5.2645.63 ▼4.03
Users Statistics /wp-admin/tools.php?page=posts_and_users_stats_users8952.2434.6136.38
Comments Statistics /wp-admin/tools.php?page=posts_and_users_stats_comments2,4212.2934.6944.97
Posts Statistics /wp-admin/tools.php?page=posts_and_users_stats_posts2,4902.1934.8145.80

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following browser errors
    • > GET request to /wp-admin/tools.php?page=posts_and_users_stats_posts
    • > Javascript (severe) in unknown
    /wp-content/plugins/posts-and-users-stats/assets/functions.min.js?ver=1.1.4 3:300 Uncaught ReferenceError: moment is not defined

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
2 plugin tags: statistics, dashboard

posts-and-users-stats/posts-and-users-stats.php Passed 13 tests

The entry point to "Posts and Users Stats" version 1.1.4 is a PHP file that has certain tags in its header comment area
92 characters long description:
Statistics about the number of posts and users, provided as diagrams, tables and csv export.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin1,370 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP5471111,185
JavaScript5918146
CSS310039

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
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%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
No PNG images were found in this plugin