89% classic-text-widget

Code Review | Classic Text Widget

WordPress plugin Classic Text Widget scored 89% from 54 tests.

About plugin

  • Plugin page: classic-text-widget
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.2
  • WordPress version: 5.8.1
  • First release: Jun 11, 2017
  • Latest release: Apr 29, 2019
  • Number of updates: 17
  • Update frequency: every 40.5 days
  • Top authors: vfontj (100%)

Code review

54 tests

User reviews

15 reviews

Install metrics

5,000+ active / 15,643 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

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

Analyzing server-side resources used by Classic Text Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.1427.16 ▲5.19
Dashboard /wp-admin3.09 ▲0.0344.01 ▲0.77
Posts /wp-admin/edit.php3.14 ▲0.0337.56 ▼1.84
Add New Post /wp-admin/post-new.php5.45 ▲0.0289.43 ▼567.85
Media Library /wp-admin/upload.php3.03 ▲0.0231.00 ▼2.06

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 1 new option
New WordPress options
widget_classictextwidget

Browser metrics Passed 4 tests

An overview of browser requirements for Classic Text Widget
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8415.75 ▲0.307.83 ▲0.1648.46 ▼0.49
Dashboard /wp-admin2,970 ▲395.87 ▼0.27137.78 ▼17.84111.01 ▼12.11
Posts /wp-admin/edit.php2,739 ▼02.69 ▼0.0065.08 ▲0.3196.18 ▲7.76
Add New Post /wp-admin/post-new.php1,672 ▼20018.70 ▼0.55351.27 ▼18.26106.61 ▼11.12
Media Library /wp-admin/upload.php1,813 ▲35.03 ▼0.02145.76 ▼1.05119.62 ▲2.99

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • widget_classictextwidget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === classic-text-widget === )
Please take inspiration from this readme.txt

classic-text-widget/plugin.php 92% from 13 tests

The main file in "Classic Text Widget" v. 1.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("classic-text-widget.php" instead of "plugin.php")

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 plugin57 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2458457
HTML1010

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.75
▷ Minimum method complexity2.00
▷ Maximum method complexity5.00
Code structure
Namespaces1
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
No PNG images were found in this plugin