84% force-transient-refresh

Code Review | Force Transient Refresh

WordPress plugin Force Transient Refresh scored84%from 54 tests.

About plugin

  • Plugin page: force-transient-r...
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.2.2
  • WordPress version: 6.3.1
  • First release: Jun 6, 2015
  • Latest release: Jun 6, 2015
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: Oxymoron (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /935 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.01MB] [CPU: ▼9.44ms] Passed 4 tests

This is a short check of server-side resources used by Force Transient Refresh
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0040.36 ▲1.43
Dashboard /wp-admin3.31 ▼0.0446.47 ▼15.55
Posts /wp-admin/edit.php3.36 ▲0.0043.63 ▼3.70
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.91 ▼19.92
Media Library /wp-admin/upload.php3.24 ▲0.0034.39 ▲1.84

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Force Transient Refresh
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.35 ▼1.031.80 ▲0.0044.30 ▲0.26
Dashboard /wp-admin2,206 ▲154.84 ▼0.06102.90 ▼3.6138.53 ▼6.03
Posts /wp-admin/edit.php2,089 ▼32.13 ▲0.1434.91 ▼0.6730.83 ▼4.35
Add New Post /wp-admin/post-new.php1,537 ▲1823.29 ▼0.01704.00 ▲45.5656.45 ▼8.37
Media Library /wp-admin/upload.php1,382 ▼34.14 ▼0.1296.82 ▼3.0542.60 ▼1.07

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

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
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
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/force-transient-refresh/force-transient-refresh.php

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === force-transient-refresh === )
Please take inspiration from this readme.txt

force-transient-refresh/force-transient-refresh.php 92% from 13 tests

"Force Transient Refresh" version 0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
No dangerous file extensions were detected19 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP151719

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.71
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.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 files were detected