94% plugins-stats-dashboard

Code Review | Plugins Stats Dashboard

WordPress plugin Plugins Stats Dashboard scored 94% from 53 tests.

About plugin

  • Plugin page: plugins-stats-das...
  • Plugin version: 2.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.7
  • WordPress version: 5.8.1
  • First release: Dec 26, 2016
  • Latest release: Mar 18, 2021
  • Number of updates: 48
  • Update frequency: every 32.2 days
  • Top authors: davidbaumwald (100%)

Code review

53 tests

User reviews

1 review

Install metrics

10+ active / 2,820 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▼263.12ms] Passed 4 tests

Analyzing server-side resources used by Plugins Stats Dashboard
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.92 ▲0.2034.14 ▲12.99
Dashboard /wp-admin3.16 ▲0.1045.72 ▲3.92
Posts /wp-admin/edit.php3.26 ▲0.1544.79 ▼2.13
Add New Post /wp-admin/post-new.php5.51 ▲0.0892.15 ▼1,051.61
Media Library /wp-admin/upload.php3.09 ▲0.0832.93 ▼2.65
Plugins Stats Dashboard /wp-admin/options-general.php?page=de_plugins_stats_dashboard3.0731.06

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 21 new files
Database: no new tables, 2 new options
New WordPress options
de_plugins_stats_dashboard_author
de_plugins_stats_dashboard_update_frequency

Browser metrics Passed 4 tests

This is an overview of browser requirements for Plugins Stats Dashboard
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,823 ▲21721.01 ▲5.466.86 ▼4.9947.41 ▼1.69
Dashboard /wp-admin3,111 ▲25810.02 ▲4.15225.84 ▲91.94130.78 ▲27.38
Posts /wp-admin/edit.php2,711 ▲52.69 ▲0.0264.99 ▲1.0293.19 ▼2.68
Add New Post /wp-admin/post-new.php3,673 ▲2,01715.02 ▼3.49399.67 ▲40.64103.43 ▼3.31
Media Library /wp-admin/upload.php1,777 ▲84.99 ▼0.01146.32 ▼10.29110.00 ▼5.51
Plugins Stats Dashboard /wp-admin/options-general.php?page=de_plugins_stats_dashboard1,1887.53132.8676.76

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstall script ran successfully

Smoke tests 75% 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 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/plugins-stats-dashboard/admin/partials/plugins-stats-dashboard-widget.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/plugins-stats-dashboard/admin/partials/plugins-stats-dashboard-settings.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: stats, dashboard, plugin, plugins

plugins-stats-dashboard/plugins-stats-dashboard.php Passed 13 tests

"Plugins Stats Dashboard" version 2.1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
82 characters long description:
Dashboard widget to display plugin stats from WordPress.org for a specific author.

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
Good job! No executable or dangerous file extensions detected486 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP10129498375
PO File13438106
JavaScript2013
CSS2002

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity3.83
▷ Minimum class complexity1.00
▷ Maximum class complexity16.00
Average method complexity1.52
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods33
▷ Static methods26.06%
▷ Public methods2472.73%
▷ Protected methods412.12%
▷ Private methods515.15%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected