84% widget-output-cache

Code Review | Widget Output Cache

WordPress plugin Widget Output Cache scored84%from 54 tests.

About plugin

  • Plugin page: widget-output-cache
  • Plugin version: 0.5.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.2
  • WordPress version: 6.3.1
  • First release: Mar 18, 2013
  • Latest release: May 18, 2023
  • Number of updates: 24
  • Update frequency: every 154.8 days
  • Top authors: kasparsd (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

400+ active /11,840 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼1.59ms] Passed 4 tests

An overview of server-side resources used by Widget Output Cache
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0549.75 ▲4.62
Dashboard /wp-admin3.33 ▲0.0349.21 ▼3.54
Posts /wp-admin/edit.php3.38 ▲0.0251.71 ▲0.54
Add New Post /wp-admin/post-new.php5.91 ▲0.0397.23 ▼4.75
Media Library /wp-admin/upload.php3.25 ▲0.0240.03 ▲1.40

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: 5 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Widget Output Cache
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.25 ▼0.281.68 ▼0.3843.64 ▲1.38
Dashboard /wp-admin2,195 ▲215.52 ▼0.1290.53 ▲2.1041.74 ▲0.82
Posts /wp-admin/edit.php2,100 ▼02.02 ▼0.0139.63 ▲2.1735.72 ▼0.43
Add New Post /wp-admin/post-new.php1,535 ▲918.01 ▼5.24657.95 ▼50.7475.95 ▲16.43
Media Library /wp-admin/upload.php1,400 ▲34.18 ▲0.0196.96 ▼21.2544.41 ▼2.90

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just 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/widget-output-cache/widget-output-cache.php:25

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
10 plugin tags: caching, transient, performance, output, widgets...

widget-output-cache/widget-output-cache.php Passed 13 tests

The main file in "Widget Output Cache" v. 0.5.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
47 characters long description:
Caches widget output in WordPress object cache.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin94 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1682194

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods112.50%
▷ Public methods787.50%
▷ Protected methods112.50%
▷ Private methods00.00%
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin