79% network-wide-posts

Code Review | Network-wide posts

WordPress plugin Network-wide posts scored79%from 54 tests.

About plugin

  • Plugin page: network-wide-posts
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.8.2
  • WordPress version: 6.3.1
  • First release: Mar 28, 2016
  • Latest release: Nov 30, 2021
  • Number of updates: 20
  • Update frequency: every 103.9 days
  • Top authors: aurovrata (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /912 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼9.57ms] Passed 4 tests

This is a short check of server-side resources used by Network-wide posts
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.48 ▼15.13
Dashboard /wp-admin3.31 ▼0.0441.64 ▼21.38
Posts /wp-admin/edit.php3.36 ▲0.0045.83 ▲3.80
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.34 ▼2.10
Media Library /wp-admin/upload.php3.23 ▲0.0033.87 ▲0.33

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 27 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Network-wide posts: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.23 ▼0.121.68 ▼0.4944.04 ▼9.59
Dashboard /wp-admin2,195 ▲245.50 ▼0.1782.90 ▼18.2137.54 ▼9.79
Posts /wp-admin/edit.php2,100 ▼02.03 ▼0.0139.41 ▲2.7236.32 ▲0.50
Add New Post /wp-admin/post-new.php1,529 ▼223.21 ▲0.01593.66 ▼73.2051.88 ▼10.31
Media Library /wp-admin/upload.php1,400 ▼04.17 ▼0.0295.68 ▼13.1742.10 ▼5.40

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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 fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/network-wide-posts/public/partials/network-wide-posts-public-display.php
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/network-wide-posts/admin/partials/network-wide-posts-admin-polylang-display.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Network_Wide_Posts_Terms' not found in wp-content/plugins/network-wide-posts/admin/class-network-wide-posts-terms-polylang.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/network-wide-posts/admin/partials/network-wide-posts-admin-display.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Network_Wide_Posts_Terms' not found in wp-content/plugins/network-wide-posts/admin/class-network-wide-posts-terms.php:26

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

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
8 plugin tags: network, multisite, multilingual, polylang, network-wide taxonomy...

network-wide-posts/network-wide-posts.php Passed 13 tests

This is the main PHP file of "Network-wide posts" version 1.1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
116 characters long description:
This is a WP Netowrk plugin which allows you to grab posts from the network blogs and display then in the main site.

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
There were no executable files found in this plugin1,229 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP173161,1361,093
CSS22871
JavaScript2185965

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity12.10
▷ Minimum class complexity1.00
▷ Maximum class complexity31.00
Average method complexity2.61
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes110.00%
▷ Concrete classes990.00%
▷ Final classes00.00%
Methods73
▷ Static methods45.48%
▷ Public methods5169.86%
▷ Protected methods1419.18%
▷ Private methods810.96%
Functions4
▷ Named functions4100.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
There are no PNG files in this plugin