84% daily-posts-widget

Code Review | Daily Posts Widget

WordPress plugin Daily Posts Widget scored 84% from 54 tests.

About plugin

  • Plugin page: daily-posts-widget
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.4
  • WordPress version: 6.3.1
  • First release: Dec 18, 2015
  • Latest release: Dec 18, 2015
  • Number of updates: 6
  • Update frequency: every 0.2 days
  • Top authors: seebeen (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,300 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼0.02ms] Passed 4 tests

A check of server-side resources used by Daily Posts Widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0637.58 ▼5.94
Dashboard /wp-admin3.36 ▲0.0550.32 ▲3.75
Posts /wp-admin/edit.php3.41 ▲0.0551.35 ▲0.68
Add New Post /wp-admin/post-new.php5.94 ▲0.05122.34 ▲21.70
Media Library /wp-admin/upload.php3.28 ▲0.0536.83 ▲1.43

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 7 new options
New WordPress options
widget_sgi_dpw_widget
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Daily Posts Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.28 ▼1.151.72 ▼0.5740.76 ▼6.90
Dashboard /wp-admin2,203 ▲154.87 ▲0.04112.18 ▲0.5836.91 ▼9.41
Posts /wp-admin/edit.php2,089 ▼32.01 ▲0.0240.68 ▼3.3535.00 ▼3.63
Add New Post /wp-admin/post-new.php1,536 ▲2223.49 ▲5.72613.87 ▼23.9553.21 ▼0.78
Media Library /wp-admin/upload.php1,382 ▼94.16 ▼0.09100.52 ▼1.4243.61 ▼0.39

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
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_sgi_dpw_widget
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not 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 take a closer look at the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_get_attachment_image_src() in wp-content/plugins/daily-posts-widget/templates/loop-dpw.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/daily-posts-widget/lib/widget-dpw.php:3

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Please add images for these screenshots: #1 (Plugin in action on desktop and Mobile), #2 (Widget options)
The official readme.txt might help

daily-posts-widget/daily-posts-widget.php Passed 13 tests

The main file in "Daily Posts Widget" v. 1.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
63 characters long description:
Widget that will display posts per day in a nice tabbely manner

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected289 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP36867213
LESS10064
JavaScript16011
CSS1001

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity18.00
▷ Minimum class complexity18.00
▷ Maximum class complexity18.00
Average method complexity3.12
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods562.50%
▷ Protected methods00.00%
▷ Private methods337.50%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.14MB with 0.08MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png112.82KB39.00KB▼ 65.43%
screenshot-2.png30.50KB14.02KB▼ 54.02%