83% the-word-widget

Code Review | The Word Widget

WordPress plugin The Word Widget scored83%from 54 tests.

About plugin

  • Plugin page: the-word-widget
  • Plugin version: 0.9
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.3
  • WordPress version: 6.3.1
  • First release: Feb 20, 2014
  • Latest release: Aug 9, 2023
  • Number of updates: 54
  • Update frequency: every 64.0 days
  • Top authors: HSteeb (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /5,536 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 gracefully, with no errors

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

Analyzing server-side resources used by The Word Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0737.42 ▼3.06
Dashboard /wp-admin3.38 ▲0.0350.71 ▼6.49
Posts /wp-admin/edit.php3.49 ▲0.1347.49 ▲4.22
Add New Post /wp-admin/post-new.php5.96 ▲0.0783.99 ▼22.24
Media Library /wp-admin/upload.php3.30 ▲0.0734.97 ▼1.79

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

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

Browser metrics Passed 4 tests

Checking browser requirements for The Word Widget
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.34 ▼0.011.71 ▲0.0337.80 ▼5.10
Dashboard /wp-admin2,195 ▲145.54 ▼0.1992.66 ▼5.9837.56 ▲0.57
Posts /wp-admin/edit.php2,100 ▼31.99 ▲0.0340.81 ▼0.7234.71 ▼3.78
Add New Post /wp-admin/post-new.php1,531 ▲223.30 ▲0.25681.18 ▲50.1160.73 ▲3.38
Media Library /wp-admin/upload.php1,394 ▼34.21 ▲0.0199.56 ▼17.6043.81 ▼3.00

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_thewordwidget
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/the-word-widget/the-word-widget.php:40

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

readme.txt 81% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 37 tag instead of maximum 10
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (The widget configuration), #2 (The widget in a wider widget area (line breaks preserved)), #3 (The widget in a small widget area (no line breaks))
  • Contributors: The plugin contributors field is not present
The official readme.txt is a good inspiration

the-word-widget/the-word-widget.php Passed 13 tests

"The Word Widget" version 0.9's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
123 characters long description:
Shows two Bible sayings per day: "The Word" by project Bible 2.0, available in over 10 languages, got remotely for each day

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected380 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP569121335
CSS16945

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.28
Average class complexity10.75
▷ Minimum class complexity3.00
▷ Maximum class complexity25.00
Average method complexity2.77
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods22
▷ Static methods1568.18%
▷ Public methods1672.73%
▷ Protected methods00.00%
▷ Private methods627.27%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants5
▷ Global constants00.00%
▷ Class constants5100.00%
▷ Public constants5100.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