10% network-summary

Code Review | Network Summary

WordPress plugin Network Summary scored 10% from 54 tests.

About plugin

  • Plugin page: network-summary
  • Plugin version: 2.0.11
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.2-4.1.1
  • WordPress version: 6.3.1
  • First release: Sep 18, 2013
  • Latest release: Mar 1, 2015
  • Number of updates: 49
  • Update frequency: every 10.8 days
  • Top authors: jokr (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 2,305 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/network-summary/includes/class-site-category-repository.php+16
    Trying to access array offset on value of type null

Server metrics [RAM: ▼0.61MB] [CPU: ▼30.60ms] Passed 4 tests

This is a short check of server-side resources used by Network Summary
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1641.10 ▲1.61
Dashboard /wp-admin3.33 ▲0.0325.77 ▼21.07
Posts /wp-admin/edit.php3.34 ▼0.0225.82 ▼21.46
Add New Post /wp-admin/post-new.php3.33 ▼2.5525.52 ▼72.62
Media Library /wp-admin/upload.php3.33 ▲0.1130.10 ▼7.24

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Network Summary
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲7413.24 ▼1.351.62 ▼0.2352.82 ▲14.33
Dashboard /wp-admin2,218 ▲305.81 ▼0.0997.01 ▼9.2742.91 ▲1.26
Posts /wp-admin/edit.php2,104 ▲152.01 ▼0.0534.35 ▼6.5136.18 ▼0.75
Add New Post /wp-admin/post-new.php1,372 ▼15621.45 ▲3.20583.30 ▼61.7752.00 ▲1.29
Media Library /wp-admin/upload.php1,394 ▲64.27 ▲0.0699.53 ▼5.8145.64 ▼0.97

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/network-summary/includes/class-network-summary-admin.php+46
    Undefined index: share_site
  • The uninstall procedure has failed, leaving 8 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • network_summary
    • can_compress_scripts
    • widget_description_widget
    • widget_recent-comments
    • db_upgraded

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 7× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/network-summary/templates/custom-feed-builder.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/network-summary/network-summary.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/network-summary/includes/class-network-summary.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/network-summary/templates/site-categories.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/network-summary/templates/network-settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_sites() on null in wp-content/plugins/network-summary/templates/feed-rss2-network.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/network-summary/includes/class-site-description-field-widget.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: Please add descriptions for these screenshots #2, #3 in network-summary/assets to your readme.txt
The official readme.txt is a good inspiration

network-summary/network-summary.php Passed 13 tests

This is the main PHP file of "Network Summary" version 2.0.11, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
71 characters long description:
Allows the display of content from other sites within the same network.

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 plugin2,077 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP193391261,758
JavaScript1201170
CSS3330149

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity15.08
▷ Minimum class complexity1.00
▷ Maximum class complexity56.00
Average method complexity2.46
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes216.67%
▷ Concrete classes1083.33%
▷ Final classes00.00%
Methods122
▷ Static methods32.46%
▷ Public methods6654.10%
▷ Protected methods4032.79%
▷ Private methods1613.11%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants233.33%
▷ Class constants466.67%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/feed-icon-14x14.png0.67KB0.70KB0.00%