84% disable-version-caching

Code Review | Disable Version Caching - Khanakia

WordPress plugin Disable Version Caching - Khanakia scored84%from 54 tests.

About plugin

  • Plugin page: disable-version-c...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.5.3
  • WordPress version: 6.3.1
  • First release: Mar 29, 2019
  • Latest release: Nov 30, 2020
  • Number of updates: 6
  • Update frequency: every 102.0 days
  • Top authors: mrkhanakia (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

400+ active /2,447 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼4.06ms] Passed 4 tests

This is a short check of server-side resources used by Disable Version Caching - Khanakia
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0439.15 ▼3.16
Dashboard /wp-admin3.37 ▲0.0646.56 ▼6.19
Posts /wp-admin/edit.php3.48 ▲0.1352.75 ▲4.01
Add New Post /wp-admin/post-new.php5.95 ▲0.0687.43 ▼9.91
Media Library /wp-admin/upload.php3.29 ▲0.0637.67 ▲3.02
Disable Version Caching /wp-admin/options-general.php?page=disable-version-caching3.2636.11

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Disable Version Caching - Khanakia
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.31 ▼1.071.95 ▲0.0840.17 ▼6.69
Dashboard /wp-admin2,213 ▲255.85 ▲0.95101.41 ▼15.1738.43 ▼7.04
Posts /wp-admin/edit.php2,093 ▲42.04 ▲0.0436.64 ▼0.9932.75 ▼2.64
Add New Post /wp-admin/post-new.php1,537 ▲1722.96 ▼0.04650.67 ▼29.5751.29 ▼6.24
Media Library /wp-admin/upload.php1,395 ▲104.19 ▲0.0293.84 ▼5.3841.99 ▼1.32
Disable Version Caching /wp-admin/options-general.php?page=disable-version-caching8512.0327.4126.72

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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_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)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 2× 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/disable-version-caching/includes/admin/class-disable-version-caching-admin-settings.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/disable-version-caching/includes/class-disable-version-caching.php:164

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Contributors: Plugin contributors not specified
Please take inspiration from this readme.txt

disable-version-caching/disable-version-caching.php Passed 13 tests

The entry point to "Disable Version Caching - Khanakia" version 1.0.1 is a PHP file that has certain tags in its header comment area
138 characters long description:
Updates the assets version of all CSS and JS files. Shows the latest changes on the site without asking the client to clear browser cache.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin371 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP495156371

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity11.67
▷ Minimum class complexity4.00
▷ Maximum class complexity24.00
Average method complexity2.45
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods22
▷ Static methods29.09%
▷ Public methods22100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.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
No PNG files were detected