90% site-info-dashboard-widget

Code Review | Site Info

WordPress plugin Site Info scored90%from 54 tests.

About plugin

  • Plugin page: site-info-dashboa...
  • Plugin version: 1.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.9
  • WordPress version: 6.3.1
  • First release: Oct 10, 2015
  • Latest release: Feb 3, 2018
  • Number of updates: 24
  • Update frequency: every 35.3 days
  • Top authors: ramiy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,417 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
This plugin's installer ran successfully

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

An overview of server-side resources used by Site Info
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.65 ▼3.57
Dashboard /wp-admin3.30 ▼0.0547.88 ▼21.75
Posts /wp-admin/edit.php3.38 ▲0.0249.93 ▲2.85
Add New Post /wp-admin/post-new.php5.91 ▲0.0293.21 ▼0.28
Media Library /wp-admin/upload.php3.25 ▲0.0235.14 ▼0.06

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Site Info
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,896 ▲13514.35 ▲0.091.78 ▼0.0343.88 ▼3.13
Dashboard /wp-admin2,302 ▲1225.55 ▼0.0785.54 ▼11.1737.95 ▼6.31
Posts /wp-admin/edit.php2,100 ▼31.94 ▼0.1034.68 ▼5.7032.44 ▼2.77
Add New Post /wp-admin/post-new.php1,526 ▼023.05 ▼0.65682.93 ▼28.9460.01 ▲6.21
Media Library /wp-admin/upload.php1,403 ▲64.18 ▼0.0194.12 ▼16.6942.15 ▼4.11

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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 SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: site info, dashboard widget, dashboard

site-info-dashboard-widget/site_info_dashboard_widget.php 92% from 13 tests

The main PHP script in "Site Info" version 1.1 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("site-info-dashboard-widget.php" instead of "site_info_dashboard_widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected43 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1225343

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.25
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.09MB with 0.06MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png90.70KB26.51KB▼ 70.77%