62% network-posts-extended

Code Review | Network Posts Extended

WordPress plugin Network Posts Extended scored62%from 54 tests.

About plugin

  • Plugin page: network-posts-ext...
  • Plugin version: 7.7.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7.1-6.4
  • WordPress version: 6.3.1
  • First release: Mar 20, 2014
  • Latest release: Nov 5, 2023
  • Number of updates: 384
  • Update frequency: every 9.2 days
  • Top authors: johnzenausa (100%)

Code review

54 tests

User reviews

28 reviews

Install metrics

300+ active /38,372 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
Install script ran successfully

Server metrics [RAM: ▲0.25MB] [CPU: ▼0.24ms] Passed 4 tests

Server-side resources used by Network Posts Extended
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.2937.41 ▼2.01
Dashboard /wp-admin3.59 ▲0.2846.10 ▼3.38
Posts /wp-admin/edit.php3.64 ▲0.2852.18 ▲3.65
Add New Post /wp-admin/post-new.php6.10 ▲0.2295.14 ▲0.77
Media Library /wp-admin/upload.php3.45 ▲0.2237.16 ▲3.65
Network Posts Ext /wp-admin/options-general.php?page=netsposts_page3.3936.28

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Network Posts Extended
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲3814.63 ▼0.081.49 ▼0.3838.64 ▼4.94
Dashboard /wp-admin2,199 ▲225.62 ▲0.0999.03 ▲5.3242.44 ▼1.15
Posts /wp-admin/edit.php2,101 ▲12.00 ▼0.0139.21 ▲6.1735.05 ▲0.59
Add New Post /wp-admin/post-new.php1,529 ▲16523.30 ▲6.36637.55 ▼42.0154.47 ▲5.83
Media Library /wp-admin/upload.php1,407 ▲74.18 ▼0.00101.56 ▲1.7741.06 ▼3.77
Network Posts Ext /wp-admin/options-general.php?page=netsposts_page6871.516.5816.46

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_theysaidso_widget
    • recovery_mode_email_last_sent
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=netsposts_page
    • > Error in wp-content/plugins/network-posts-extended/components/settings/NetsPostsNetworkSettings.php+19
    Uncaught Error: Call to undefined function NetworkPosts\Components\Settings\get_sites() in wp-content/plugins/network-posts-extended/components/settings/NetsPostsNetworkSettings.php:19
    Stack trace:
    #0 wp-content/plugins/network-posts-extended/components/settings/NetsPostsNetworkSettings.php(12): NetworkPosts\Components\Settings\NetsPostsNetworkSettings::get_restricted_excerpt_tag_blogs()
    #1 wp-content/plugins/network-posts-extended/components/settings/NetsPostsBlogSettingsPage.php(25): NetworkPosts\Components\Settings\NetsPostsNetworkSettings::is_excerpt_tags_denied()
    #2 wp-includes/class-wp-hook.php(310): NetworkPosts\Components\Settings\NetsPostsBlogSettingsPage::print_page()
    #3 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #4 wp-includes/plugin.php(517): WP_Hook->do_action()
    #5 wp-admin/admin.php(259): do_action()
    #6 wp-admin/options-general.

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 take a closer look at the following
  • 3× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/network-posts-extended/network-posts-extended.php
    • > /wp-content/plugins/network-posts-extended/views/network_settings.php
    • > /wp-content/plugins/network-posts-extended/views/resizer/network_settings.php
  • 14× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/network-posts-extended/views/network_settings.php on line 4
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/network-posts-extended/views/resizer/network_settings.php on line 14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function netsposts_path() in wp-content/plugins/network-posts-extended/autoload.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function netsposts_path() in wp-content/plugins/network-posts-extended/autoload.php:3
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/network-posts-extended/views/network_settings.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function NetworkPosts\\Components\\Resizer\\plugin_dir_path() in wp-content/plugins/network-posts-extended/components/resizer/NetsPostsThumbnailResizerClient.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function NetworkPosts\\Components\\resizer\\plugin_dir_path() in wp-content/plugins/network-posts-extended/components/resizer/NetsPostsImageResizerFacade.php:11
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/network-posts-extended/views/resizer/network_settings.php on line 4
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/network-posts-extended/views/resizer/network_settings.php on line 4
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/network-posts-extended/views/resizer/network_settings.php on line 14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: network global posts, global posts, multisite posts, shared posts, display multisite posts...

network-posts-extended/network-posts-extended.php 92% from 13 tests

The principal PHP file in "Network Posts Extended" v. 7.7.1 is loaded by WordPress automatically on each request
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 191 characters long)

Code Analysis 5% from 3 tests

File types 0% from 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
It is important to fix the following items
  • For security reasons, never distribute binary or executable files with your plugin
    • .lnk - File Shortcut in Windows
      • wp-content/plugins/network-posts-extended/language/11-07-2017 - Shortcut.lnk
4,055 lines of code in 66 files:
LanguageFilesBlank linesComment linesLines of code
PHP447513063,001
HTML61340488
CSS490238
JavaScript23774171
PO File62832153
SVG4004

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity9.61
▷ Minimum class complexity1.00
▷ Maximum class complexity54.00
Average method complexity1.92
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces8
Interfaces0
Traits0
Classes31
▷ Abstract classes39.68%
▷ Concrete classes2890.32%
▷ Final classes13.57%
Methods291
▷ Static methods6923.71%
▷ Public methods21373.20%
▷ Protected methods6020.62%
▷ Private methods186.19%
Functions64
▷ Named functions4367.19%
▷ Anonymous functions2132.81%
Constants20
▷ Global constants735.00%
▷ Class constants1365.00%
▷ Public constants1292.31%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin