83% widgets-widgets-widgets

Code Review | WordPress Widgets Refresh

WordPress plugin WordPress Widgets Refreshscored83%from 54 tests.

About plugin

  • Plugin page: widgets-widgets-w...
  • Plugin version: 0.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-3.6
  • WordPress version: 6.3.1
  • First release: Aug 17, 2013
  • Latest release: Jul 12, 2018
  • Number of updates: 4
  • Update frequency: every 447.5 days
  • Top authors: jtsternberg (75%)Otto42 (50%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,851 total downloads

Benchmarks

Plugin footprint 83% 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: ▲0.02MB] [CPU: ▼3.16ms] Passed 4 tests

Analyzing server-side resources used by WordPress Widgets Refresh
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0242.33 ▲1.97
Dashboard /wp-admin3.33 ▲0.0346.13 ▼2.78
Posts /wp-admin/edit.php3.38 ▲0.0247.07 ▲0.31
Add New Post /wp-admin/post-new.php5.91 ▲0.0282.13 ▼12.13
Media Library /wp-admin/upload.php3.26 ▲0.0235.39 ▲2.08
Widgets (Refreshed) /wp-admin/themes.php?page=wordpress-widgets-refresh3.2231.53

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for WordPress Widgets Refresh
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.27 ▼1.134.62 ▲2.6443.76 ▼0.54
Dashboard /wp-admin2,210 ▲284.82 ▼0.02103.33 ▼8.7540.40 ▼1.18
Posts /wp-admin/edit.php2,090 ▲12.14 ▲0.0833.68 ▼3.7836.14 ▲2.82
Add New Post /wp-admin/post-new.php1,540 ▲2623.12 ▲5.59679.08 ▲65.9255.61 ▲4.35
Media Library /wp-admin/upload.php1,392 ▲74.26 ▲0.0296.79 ▼1.4842.99 ▼1.95
Widgets (Refreshed) /wp-admin/themes.php?page=wordpress-widgets-refresh7452.0523.6922.42

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/widgets-widgets-widgets/views/admin.php

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === WordPress Widgets Refresh=== )
The official readme.txt is a good inspiration

widgets-widgets-widgets/wordpress-widgets-refresh.php 77% from 13 tests

The principal PHP file in "WordPress Widgets Refresh" v. 0.1.0 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("widgets-widgets-widgets.php" instead of "wordpress-widgets-refresh.php")
  • Domain Path: The domain path folder does not exist ("/lang")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin72 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP33815072

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity1.45
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods327.27%
▷ Public methods1090.91%
▷ Protected methods00.00%
▷ Private methods19.09%
Functions0
▷ Named functions00.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
PNG images were not found in this plugin