89% multisite-widgets-context

Code Review | Multisite Widgets Context

WordPress plugin Multisite Widgets Context scored89%from 54 tests.

About plugin

  • Plugin page: multisite-widgets...
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.9.7
  • WordPress version: 6.3.1
  • First release: Apr 18, 2015
  • Latest release: Jul 22, 2018
  • Number of updates: 18
  • Update frequency: every 66.2 days
  • Top authors: nicholas_io (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

30+ active /3,647 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by Multisite Widgets Context
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0042.78 ▲4.60
Dashboard /wp-admin3.31 ▲0.0045.25 ▼4.51
Posts /wp-admin/edit.php3.36 ▲0.0046.06 ▼0.27
Add New Post /wp-admin/post-new.php5.89 ▲0.0078.79 ▼19.33
Media Library /wp-admin/upload.php3.23 ▲0.0033.63 ▼2.09

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Multisite Widgets Context
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.33 ▼0.961.80 ▲0.0841.99 ▼1.99
Dashboard /wp-admin2,206 ▲185.79 ▼0.08110.67 ▲5.4539.23 ▼4.05
Posts /wp-admin/edit.php2,092 ▲32.00 ▼0.0441.70 ▲1.4636.94 ▼2.10
Add New Post /wp-admin/post-new.php1,533 ▼523.20 ▼0.05601.38 ▲10.7149.62 ▼3.86
Media Library /wp-admin/upload.php1,388 ▼34.26 ▼0.0397.39 ▼1.3845.07 ▲0.33

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

Smoke tests Passed 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 Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Donate link: Please fix this invalid URI: ""
  • Screenshots: Add images for these screenshots: #1 (A Recent Posts Widget configured to execute on another site context.), #2 (A Nav Menu Widget with select populated with data from target site due to checked checkbox)
You can take inspiration from this readme.txt

multisite-widgets-context/multisite-widgets-context.php 92% from 13 tests

"Multisite Widgets Context" version 1.1.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin257 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP165122172
Markdown120041
CSS15023
JavaScript18621

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity31.00
▷ Minimum class complexity31.00
▷ Maximum class complexity31.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods15
▷ Static methods320.00%
▷ Public methods1493.33%
▷ Protected methods00.00%
▷ Private methods16.67%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.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
2 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png17.49KB7.92KB▼ 54.71%
screenshot-2.png16.04KB7.39KB▼ 53.95%