84% network-sites-counts-dashboard-widget

Code Review | Network Sites Counts Dashboard Widget

WordPress plugin Network Sites Counts Dashboard Widget scored84%from 54 tests.

About plugin

  • Plugin page: network-sites-cou...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-6.2
  • WordPress version: 6.3.1
  • First release: May 17, 2014
  • Latest release: Mar 31, 2023
  • Number of updates: 13
  • Update frequency: every 249.2 days
  • Top authors: tw2113 (69.23%)jtsternberg (38.46%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,464 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

Server-side resources used by Network Sites Counts Dashboard Widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0235.30 ▼16.02
Dashboard /wp-admin3.33 ▲0.0346.07 ▼1.59
Posts /wp-admin/edit.php3.38 ▲0.0244.00 ▼4.25
Add New Post /wp-admin/post-new.php5.91 ▲0.0294.60 ▲0.43
Media Library /wp-admin/upload.php3.25 ▲0.0234.49 ▲1.05

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Network Sites Counts Dashboard Widget
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.23 ▼1.141.67 ▼0.2541.00 ▼0.72
Dashboard /wp-admin2,209 ▲184.85 ▼0.08102.01 ▼3.4039.19 ▼10.08
Posts /wp-admin/edit.php2,086 ▼31.98 ▼0.0336.71 ▼1.6431.74 ▼5.42
Add New Post /wp-admin/post-new.php1,514 ▼1917.61 ▼5.69647.94 ▼16.9766.86 ▲8.45
Media Library /wp-admin/upload.php1,391 ▲34.19 ▼0.0295.41 ▼10.8442.96 ▼5.16

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/network-sites-counts-dashboard-widget/network-sites-counts-dashboard-widget.php:38

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: mu, dashboard widget, multisite, post count, network

network-sites-counts-dashboard-widget/network-sites-counts-dashboard-widget.php Passed 13 tests

The main PHP file in "Network Sites Counts Dashboard Widget" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
62 characters long description:
Display a list of post counts for all your sites in a network.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin185 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP24298185

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity9.50
▷ Minimum class complexity6.00
▷ Maximum class complexity13.00
Average method complexity2.70
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin