90% wp-widget-preview

Code Review | WP Widget Preview

WordPress plugin WP Widget Preview scored90%from 54 tests.

About plugin

  • Plugin page: wp-widget-preview
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.6
  • WordPress version: 6.3.1
  • First release: Jul 9, 2013
  • Latest release: Jul 9, 2013
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: daankortenbach (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /4,048 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
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by WP Widget Preview
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0137.71 ▼2.43
Dashboard /wp-admin3.32 ▲0.0246.38 ▼4.30
Posts /wp-admin/edit.php3.37 ▲0.0146.03 ▲0.24
Add New Post /wp-admin/post-new.php5.90 ▲0.0184.66 ▼8.17
Media Library /wp-admin/upload.php3.24 ▲0.0139.00 ▲1.35

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for WP Widget Preview
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.28 ▼0.361.68 ▼0.1139.29 ▼2.92
Dashboard /wp-admin2,192 ▲155.65 ▲0.0888.39 ▼8.1037.66 ▼1.86
Posts /wp-admin/edit.php2,100 ▼02.00 ▲0.0635.91 ▼1.3531.15 ▼7.86
Add New Post /wp-admin/post-new.php1,526 ▼122.90 ▼0.10613.00 ▼13.1563.31 ▲0.90
Media Library /wp-admin/upload.php1,403 ▲94.21 ▲0.0398.34 ▼23.2444.55 ▼4.01

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
2 plugin tags: widget, preview

wp-widget-preview/wp-widget-preview.php Passed 13 tests

"WP Widget Preview" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
89 characters long description:
Enables a preview mode for widgets. In preview mode, widgets are only visible for admins.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected39 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1147939

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.50
▷ Minimum method complexity2.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin