84% widget-subtitle

Code Review | Widget Subtitle

WordPress plugin Widget Subtitle scored84%from 54 tests.

About plugin

  • Plugin page: widget-subtitle
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.7
  • WordPress version: 6.3.1
  • First release: Nov 28, 2013
  • Latest release: Nov 28, 2013
  • Number of updates: 3
  • Update frequency: every 0.7 days
  • Top authors: eduardozulian (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,427 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.02MB] [CPU: ▼8.36ms] Passed 4 tests

An overview of server-side resources used by Widget Subtitle
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.29 ▼9.08
Dashboard /wp-admin3.32 ▲0.0256.35 ▲8.98
Posts /wp-admin/edit.php3.37 ▲0.0246.99 ▼1.61
Add New Post /wp-admin/post-new.php5.90 ▲0.0285.75 ▼20.77
Media Library /wp-admin/upload.php3.25 ▲0.0234.30 ▼1.99

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Widget Subtitle
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4314.48 ▲0.191.86 ▼0.0840.18 ▼14.65
Dashboard /wp-admin2,200 ▲155.80 ▲0.88103.79 ▼2.3441.16 ▼6.07
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0033.51 ▼7.7834.44 ▼0.85
Add New Post /wp-admin/post-new.php1,534 ▼423.11 ▼0.45644.35 ▼49.2752.92 ▼1.09
Media Library /wp-admin/upload.php1,391 ▲34.19 ▲0.01100.45 ▲1.0541.94 ▼1.72

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/widget-subtitle/widget-subtitle.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
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
4 plugin tags: widget subtitle, subtitle, sidebar, widget

widget-subtitle/widget-subtitle.php Passed 13 tests

The principal PHP file in "Widget Subtitle" v. 1.0 is loaded by WordPress automatically on each request
42 characters long description:
Add a subtitle input field to all widgets.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin89 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP1263145
PO File17324
Markdown18020

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.60
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.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

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