10% donbaler-recent-posts-widget

Code Review | Donbaler Recent Posts Widget

WordPress plugin Donbaler Recent Posts Widget scored10%from 54 tests.

About plugin

  • Plugin page: donbaler-recent-p...
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.2.2
  • WordPress version: 6.3.1
  • First release: Jun 1, 2015
  • Latest release: Jun 2, 2015
  • Number of updates: 9
  • Update frequency: every 0.1 days
  • Top authors: nipoto (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /732 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/donbaler-recent-posts-widget/index.php+53
    Function create_function() is deprecated

Server metrics [RAM: ▼1.96MB] [CPU: ▼58.18ms] Passed 4 tests

This is a short check of server-side resources used by Donbaler Recent Posts Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.83 ▼41.92
Dashboard /wp-admin2.05 ▼1.264.90 ▼52.01
Posts /wp-admin/edit.php2.05 ▼1.317.49 ▼43.59
Add New Post /wp-admin/post-new.php2.05 ▼3.845.29 ▼95.18
Media Library /wp-admin/upload.php2.05 ▼1.185.55 ▼31.67

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

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

Browser metrics Passed 4 tests

Donbaler Recent Posts Widget: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,897 ▲13613.77 ▼0.828.47 ▲6.5641.97 ▼2.39
Dashboard /wp-admin2,198 ▲185.52 ▼0.0885.65 ▼3.4839.76 ▲2.30
Posts /wp-admin/edit.php2,100 ▼01.94 ▼0.0339.01 ▼1.0133.92 ▼2.02
Add New Post /wp-admin/post-new.php1,526 ▼023.17 ▼0.08666.28 ▼28.8262.42 ▼3.34
Media Library /wp-admin/upload.php1,403 ▲64.18 ▲0.04103.76 ▼13.7148.44 ▲1.95

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
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/donbaler-recent-posts-widget/index.php+53
    Function create_function() is deprecated
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_wp_donbaler
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/donbaler-recent-posts-widget/index.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: microblog, widget, donbaler, recent posts

donbaler-recent-posts-widget/index.php 92% from 13 tests

The main file in "Donbaler Recent Posts Widget" v. 1.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("donbaler-recent-posts-widget.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected174 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
CSS10083
JavaScript10049
PHP15842

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity3.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin