10% pro-text-widget

Code Review | Pro Text Widget

WordPress plugin Pro Text Widget scored10%from 54 tests.

About plugin

  • Plugin page: pro-text-widget
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9-4.4
  • WordPress version: 6.3.1
  • First release: Apr 19, 2014
  • Latest release: Jan 3, 2016
  • Number of updates: 6
  • Update frequency: every 104.0 days
  • Top authors: shambhu patnaik (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /2,545 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/pro-text-widget/pro-text-widget.php+111
    Function create_function() is deprecated

Server metrics [RAM: ▼1.90MB] [CPU: ▼57.04ms] Passed 4 tests

Server-side resources used by Pro Text Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.09 ▼1.385.16 ▼43.35
Dashboard /wp-admin2.11 ▼1.206.27 ▼45.51
Posts /wp-admin/edit.php2.11 ▼1.255.67 ▼46.13
Add New Post /wp-admin/post-new.php2.11 ▼3.787.21 ▼93.17
Media Library /wp-admin/upload.php2.11 ▼1.126.19 ▼30.71

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_pro_text_widget
widget_recent-comments

Browser metrics Passed 4 tests

Pro Text Widget: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.34 ▼0.211.70 ▼0.3644.94 ▼0.93
Dashboard /wp-admin2,195 ▲185.57 ▼0.0886.64 ▼1.3841.56 ▼3.58
Posts /wp-admin/edit.php2,100 ▼01.99 ▲0.0434.48 ▼9.4033.98 ▼2.91
Add New Post /wp-admin/post-new.php1,526 ▼223.11 ▲0.35661.30 ▲16.8768.86 ▲3.88
Media Library /wp-admin/upload.php1,400 ▼04.19 ▲0.04101.60 ▲2.8945.14 ▼0.36

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/pro-text-widget/pro-text-widget.php+111
    Function create_function() is deprecated
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_pro_text_widget
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/pro-text-widget/index.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/pro-text-widget/pro-text-widget.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: text widget, pro text widget, text, widget, custom text widget...

pro-text-widget/pro-text-widget.php Passed 13 tests

This is the main PHP file of "Pro Text Widget" version 1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
85 characters long description:
Pro Text Widget.You have choice to text widget show only specific Post/category/Page.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin101 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP21216101

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity23.00
▷ Minimum class complexity23.00
▷ Maximum class complexity23.00
Average method complexity6.50
▷ Minimum method complexity1.00
▷ Maximum method complexity20.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

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png15.01KB6.76KB▼ 55.00%