84% dashboard-posts-stats

Code Review | Dashboard Posts Stats

WordPress plugin Dashboard Posts Stats scored84%from 54 tests.

About plugin

  • Plugin page: dashboard-posts-s...
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.5
  • WordPress version: 6.3.1
  • First release: Jan 21, 2013
  • Latest release: Jan 21, 2013
  • Number of updates: 3
  • Update frequency: every 0.7 days
  • Top authors: felipelavinz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,504 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.12MB] [CPU: ▼7.76ms] Passed 4 tests

A check of server-side resources used by Dashboard Posts Stats
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.97 ▼0.4923.79 ▼18.48
Dashboard /wp-admin3.31 ▲0.0146.25 ▼1.24
Posts /wp-admin/edit.php3.36 ▲0.0150.27 ▲4.88
Add New Post /wp-admin/post-new.php5.89 ▲0.0181.83 ▼12.87
Media Library /wp-admin/upload.php3.23 ▲0.0034.21 ▲1.54

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Dashboard Posts Stats
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,906 ▲17120.63 ▲5.8792.65 ▲90.8163.42 ▲20.03
Dashboard /wp-admin2,486 ▲2959.79 ▲3.88200.43 ▲96.4559.16 ▲17.27
Posts /wp-admin/edit.php2,086 ▼32.02 ▲0.0340.57 ▲4.8134.08 ▲0.87
Add New Post /wp-admin/post-new.php1,528 ▲1418.07 ▲0.37632.46 ▼39.2850.28 ▼4.61
Media Library /wp-admin/upload.php1,385 ▼64.17 ▼0.0295.09 ▼2.5243.04 ▼1.69

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

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
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dashboard-posts-stats/wp-dashboard-posts-stats.php:37

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
9 plugin tags: visualization, analytics, stats, statistics, cms...

dashboard-posts-stats/wp-dashboard-posts-stats.php 92% from 13 tests

The main PHP script in "Dashboard Posts Stats" version 0.1 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("dashboard-posts-stats.php" instead of "wp-dashboard-posts-stats.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
Success! There were no dangerous files found in this plugin118 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1113483
JavaScript10135

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.20
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity1.90
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods110.00%
▷ Public methods660.00%
▷ Protected methods00.00%
▷ Private methods440.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.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