84% easy-php-text-widget

Code Review | Easy PHP Text Widget

WordPress plugin Easy PHP Text Widget scored84%from 54 tests.

About plugin

  • Plugin page: easy-php-text-widget
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.9
  • WordPress version: 6.3.1
  • First release: May 9, 2017
  • Latest release: Dec 12, 2017
  • Number of updates: 3
  • Update frequency: every 72.4 days
  • Top authors: dipakbbsr (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /703 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.01MB] [CPU: ▼3.22ms] Passed 4 tests

Server-side resources used by Easy PHP Text Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.98 ▼2.04
Dashboard /wp-admin3.31 ▲0.0151.25 ▼1.31
Posts /wp-admin/edit.php3.36 ▲0.0153.64 ▲2.34
Add New Post /wp-admin/post-new.php5.89 ▲0.0198.08 ▼6.27
Media Library /wp-admin/upload.php3.23 ▲0.0139.34 ▼3.24

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Easy PHP Text Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.72 ▲0.141.61 ▼0.2542.61 ▼0.73
Dashboard /wp-admin2,195 ▲215.51 ▼0.1489.30 ▼9.2237.48 ▼9.05
Posts /wp-admin/edit.php2,103 ▲31.97 ▼0.0238.28 ▲2.7034.60 ▼7.48
Add New Post /wp-admin/post-new.php1,526 ▼223.50 ▲0.30674.54 ▼17.2868.46 ▲12.11
Media Library /wp-admin/upload.php1,400 ▼04.26 ▲0.09106.92 ▼7.8445.83 ▼2.74

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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 trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/easy-php-text-widget/easy-php-text-widget.php:45

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: execute php, php widget, php, text widget, widget

easy-php-text-widget/easy-php-text-widget.php 92% from 13 tests

The main PHP script in "Easy PHP Text Widget" version 1.0.0 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 153 characters long)

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

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.25
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin