10% bio-widget

Code Review | Bio Widget

WordPress plugin Bio Widget scored10%from 54 tests.

About plugin

  • Plugin page: bio-widget
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0-4.0
  • WordPress version: 6.3.1
  • First release: Sep 25, 2014
  • Latest release: Sep 25, 2014
  • Number of updates: 4
  • Update frequency: every 2.0 days
  • Top authors: farhadmolla (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,111 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Please fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/bio-widget/bio-widget.php+37
    Methods with the same name as their class will not be constructors in a future version of PHP; gmp_widget has a deprecated constructor

Server metrics [RAM: ▼1.72MB] [CPU: ▼52.15ms] Passed 4 tests

Analyzing server-side resources used by Bio Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.28 ▼1.189.12 ▼28.66
Dashboard /wp-admin2.29 ▼1.0511.05 ▼53.08
Posts /wp-admin/edit.php2.29 ▼1.0611.25 ▼34.24
Add New Post /wp-admin/post-new.php2.29 ▼3.599.65 ▼92.62
Media Library /wp-admin/upload.php2.29 ▼0.949.93 ▼26.93

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_gmp_widget_bio
db_upgraded
widget_recent-posts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Bio Widget
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.35 ▼0.231.72 ▲0.1743.20 ▲3.09
Dashboard /wp-admin2,198 ▲205.65 ▼0.0892.00 ▼14.8244.50 ▲3.13
Posts /wp-admin/edit.php2,082 ▼181.98 ▼0.0033.83 ▼3.3732.69 ▼2.89
Add New Post /wp-admin/post-new.php1,526 ▼223.06 ▲0.09674.88 ▲34.9660.05 ▲0.10
Media Library /wp-admin/upload.php1,400 ▼04.23 ▲0.03105.12 ▲4.5049.05 ▲4.05

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • Uninstall procedure had uncaught errors
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in gmp_widget is deprecated since version 4.3.0! Use __construct() instead.
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_gmp_widget_bio

Smoke tests 75% from 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 50% from 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
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bio-widget/bio-widget.php:29

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% 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
Please fix the following attributes:
  • Screenshots: Please add an image for screenshot #1 (Example Widget)
The official readme.txt is a good inspiration

bio-widget/bio-widget.php Passed 13 tests

The main PHP file in "Bio Widget" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
41 characters long description:
Example widget that displays a user's bio

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 plugin42 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1142842

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity4.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png2.28KB1.19KB▼ 47.90%