84% sp-display-widgets

Code Review | Hide Widgets (SP Display Widgets)

WordPress plugin Hide Widgets (SP Display Widgets) scored84%from 54 tests.

About plugin

  • Plugin page: sp-display-widgets
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.3-4.9.4
  • WordPress version: 6.3.1
  • First release: May 4, 2018
  • Latest release: Mar 8, 2019
  • Number of updates: 10
  • Update frequency: every 30.8 days
  • Top authors: spoot1986 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,281 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.04MB] [CPU: ▼3.98ms] Passed 4 tests

This is a short check of server-side resources used by Hide Widgets (SP Display Widgets)
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0542.79 ▼8.15
Dashboard /wp-admin3.34 ▲0.0452.07 ▼1.31
Posts /wp-admin/edit.php3.39 ▲0.0450.17 ▲1.32
Add New Post /wp-admin/post-new.php5.92 ▲0.0485.50 ▼7.78
Media Library /wp-admin/upload.php3.26 ▲0.0437.18 ▲2.27

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Hide Widgets (SP Display Widgets)
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.23 ▼1.551.78 ▲0.0444.83 ▼2.53
Dashboard /wp-admin2,203 ▲145.83 ▲0.8995.25 ▼26.9239.15 ▼2.81
Posts /wp-admin/edit.php2,089 ▼32.01 ▲0.0440.31 ▲1.8436.16 ▲1.67
Add New Post /wp-admin/post-new.php1,533 ▲1422.87 ▼0.36648.06 ▲19.5554.94 ▲2.82
Media Library /wp-admin/upload.php1,385 ▼34.20 ▲0.0495.50 ▼3.5344.66 ▲0.60

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/sp-display-widgets/sp-display-widgets.php:41

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 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Screenshots: Screenshot #1 (Settings 01) image required
Please take inspiration from this readme.txt

sp-display-widgets/sp-display-widgets.php Passed 13 tests

"Hide Widgets (SP Display Widgets)" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
61 characters long description:
Adds checkboxes to each widget to show or hide on site pages.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected601 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP110632526
PO File1286075

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.72
Average class complexity159.00
▷ Minimum class complexity159.00
▷ Maximum class complexity159.00
Average method complexity10.29
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods17100.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
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png17.35KB6.72KB▼ 61.30%