84% trim-widget-descriptions

Code Review | Trim Widget Descriptions

WordPress plugin Trim Widget Descriptions scored84%from 54 tests.

About plugin

  • Plugin page: trim-widget-descr...
  • Plugin version: 0.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-4.4.0
  • WordPress version: 6.3.1
  • First release: Jan 22, 2014
  • Latest release: Dec 8, 2015
  • Number of updates: 8
  • Update frequency: every 85.6 days
  • Top authors: webdeveric (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /746 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.12ms] Passed 4 tests

Analyzing server-side resources used by Trim Widget Descriptions
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.03 ▲0.36
Dashboard /wp-admin3.32 ▲0.0243.78 ▼1.79
Posts /wp-admin/edit.php3.38 ▲0.0242.12 ▼4.00
Add New Post /wp-admin/post-new.php5.91 ▲0.0277.47 ▼3.06
Media Library /wp-admin/upload.php3.25 ▲0.0235.39 ▲1.86

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Trim Widget Descriptions
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.25 ▲0.001.66 ▲0.0641.41 ▼0.16
Dashboard /wp-admin2,198 ▲215.58 ▼0.0383.26 ▼2.0437.94 ▼0.18
Posts /wp-admin/edit.php2,100 ▼01.95 ▲0.0034.09 ▼1.3034.29 ▼2.14
Add New Post /wp-admin/post-new.php1,538 ▲1223.18 ▲0.01671.10 ▼40.9053.84 ▼3.13
Media Library /wp-admin/upload.php1,394 ▼94.18 ▼0.0896.12 ▼0.9844.15 ▲0.72

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

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 | 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× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/trim-widget-descriptions/trim-widget-descriptions.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: user interface, widgets, admin

trim-widget-descriptions/trim-widget-descriptions.php Passed 13 tests

The entry point to "Trim Widget Descriptions" version 0.2.2 is a PHP file that has certain tags in its header comment area
78 characters long description:
Limit the length of the description under each widget on the the widgets page.

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
No dangerous file extensions were detected91 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP121991

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity3.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 methods4100.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected