84% pws-better-widget-title

Code Review | PWS Better Widget Title

WordPress plugin PWS Better Widget Title scored84%from 54 tests.

About plugin

  • Plugin page: pws-better-widget...
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.4.1
  • WordPress version: 6.3.1
  • First release: Jul 3, 2019
  • Latest release: May 23, 2020
  • Number of updates: 12
  • Update frequency: every 27.1 days
  • Top authors: davidhe2018 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /614 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.06MB] [CPU: ▼3.52ms] Passed 4 tests

An overview of server-side resources used by PWS Better Widget Title
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0643.57 ▲7.99
Dashboard /wp-admin3.36 ▲0.0541.64 ▼5.15
Posts /wp-admin/edit.php3.47 ▲0.1145.83 ▲1.14
Add New Post /wp-admin/post-new.php5.96 ▲0.0781.59 ▼6.92
Media Library /wp-admin/upload.php3.28 ▲0.0533.69 ▼3.16

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

PWS Better Widget Title: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,876 ▲9013.79 ▼0.577.99 ▲6.1735.52 ▼7.45
Dashboard /wp-admin2,199 ▲225.64 ▲0.1297.77 ▲11.0341.99 ▼1.04
Posts /wp-admin/edit.php2,104 ▲12.02 ▲0.0439.61 ▲5.2335.61 ▼3.19
Add New Post /wp-admin/post-new.php1,540 ▲1118.05 ▼5.18606.82 ▼77.1475.84 ▲11.35
Media Library /wp-admin/upload.php1,404 ▲14.15 ▼0.0393.29 ▼7.6642.51 ▼5.42

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 does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
The following issues need your attention
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/pws-better-widget-title/admin/partials/pws-better-widget-title-admin-display.php
    • > /wp-content/plugins/pws-better-widget-title/public/partials/pws-better-widget-title-public-display.php

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

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Donate link: Invalid url: ""
The official readme.txt might help

pws-better-widget-title/pws-better-widget-title.php Passed 13 tests

This is the main PHP file of "PWS Better Widget Title" version 1.0.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
130 characters long description:
Hide widget titles that are inside the square brackets, "[]". Handles multiple occurrence. Compatible with WordPress version 3.0+.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin201 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12111550195
JavaScript24546
CSS2080

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity2.43
▷ Minimum class complexity1.00
▷ Maximum class complexity8.00
Average method complexity1.40
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods25
▷ Static methods28.00%
▷ Public methods1976.00%
▷ Protected methods00.00%
▷ Private methods624.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin