84% expanding-widgets

Code Review | Expanding Widgets

WordPress plugin Expanding Widgets scored84%from 54 tests.

About plugin

  • Plugin page: expanding-widgets
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.3
  • WordPress version: 6.3.1
  • First release: Jul 25, 2014
  • Latest release: Aug 10, 2015
  • Number of updates: 8
  • Update frequency: every 47.6 days
  • Top authors: mattclements (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /911 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.72ms] Passed 4 tests

This is a short check of server-side resources used by Expanding Widgets
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.42 ▼3.22
Dashboard /wp-admin3.33 ▲0.0346.95 ▼4.06
Posts /wp-admin/edit.php3.38 ▲0.0347.86 ▼3.75
Add New Post /wp-admin/post-new.php5.91 ▲0.0396.46 ▼2.96
Media Library /wp-admin/upload.php3.26 ▲0.0334.43 ▼3.83

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_expandingwidgets
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Expanding Widgets
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.62 ▼1.024.57 ▲2.5143.80 ▼0.65
Dashboard /wp-admin2,203 ▲155.77 ▲0.91102.13 ▼14.5439.33 ▼6.57
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0640.09 ▲0.1735.50 ▲0.43
Add New Post /wp-admin/post-new.php1,546 ▲1318.26 ▼5.09611.69 ▼55.7859.53 ▲3.87
Media Library /wp-admin/upload.php1,388 ▲34.21 ▼0.0293.50 ▼9.1643.46 ▼1.51

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • widget_expandingwidgets
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 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 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/expanding-widgets/expanding-widgets.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
2 plugin tags: expanding, widget

expanding-widgets/expanding-widgets.php Passed 13 tests

This is the main PHP file of "Expanding Widgets" version 1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
75 characters long description:
Expanding Widget system, allows multiple widgets to be created and expanded

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
Success! There were no dangerous files found in this plugin132 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1241392
JavaScript17040

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity4.75
▷ Minimum method complexity1.00
▷ Maximum method complexity6.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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin