73% divelogs-widget

Code Review | Divelogs Widget

WordPress plugin Divelogs Widget scored 73% from 54 tests.

About plugin

  • Plugin page: divelogs-widget
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 2.3-6.3.1
  • WordPress version: 6.3.1
  • First release: Jul 18, 2011
  • Latest release: Aug 15, 2023
  • Number of updates: 34
  • Update frequency: every 129.7 days
  • Top authors: klemmkeil (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

20+ active / 1,980 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.71MB] [CPU: ▼48.46ms] Passed 4 tests

Server-side resources used by Divelogs Widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.28 ▼1.1811.03 ▼30.27
Dashboard /wp-admin2.29 ▼1.0111.90 ▼53.15
Posts /wp-admin/edit.php2.29 ▼1.0612.67 ▼34.30
Add New Post /wp-admin/post-new.php2.29 ▼3.5910.93 ▼76.11
Media Library /wp-admin/upload.php2.29 ▼0.9412.51 ▼21.79

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Divelogs Widget
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.35 ▼0.881.72 ▼0.0943.42 ▲4.19
Dashboard /wp-admin2,206 ▲155.90 ▼0.00108.72 ▲8.0742.40 ▲4.73
Posts /wp-admin/edit.php2,086 ▼32.05 ▲0.0734.41 ▼4.7331.13 ▼2.45
Add New Post /wp-admin/post-new.php1,542 ▼018.42 ▼0.09600.77 ▼33.3656.62 ▲3.46
Media Library /wp-admin/upload.php1,391 ▲34.28 ▲0.06101.86 ▼3.1945.94 ▲0.74

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in Divelogs_Widget is deprecated since version 4.3.0! Use __construct() instead.
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_divelogs-widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

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
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/divelogs-widget/divelogs-widget.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Screenshots: These screenshots require images: #1 (Widget Settings), #2 (The Widget), #3 (Using the shortcode)
  • Plugin Name: You should set the name of your plugin on the first line ( === divelogs-widget === )
Please take inspiration from this readme.txt

divelogs-widget/divelogs-widget.php 92% from 13 tests

The main PHP script in "Divelogs Widget" version 1.4 is automatically included on every request by WordPress
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 424 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
No dangerous file extensions were detected133 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13460133

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity27.00
▷ Minimum class complexity27.00
▷ Maximum class complexity27.00
Average method complexity7.50
▷ Minimum method complexity1.00
▷ Maximum method complexity17.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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
7 PNG files occupy 0.61MB with 0.36MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png304.55KB135.07KB▼ 55.65%
assets/icon-256x256.png38.42KB14.01KB▼ 63.54%
screenshot-1.png18.39KB8.78KB▼ 52.28%
screenshot-2.png12.21KB5.69KB▼ 53.35%
assets/icon-128x128.png16.12KB4.97KB▼ 69.18%