73% flash-cache

Code Review | Flash Cache

WordPress plugin Flash Cache scored73%from 54 tests.

About plugin

  • Plugin page: flash-cache
  • Plugin version: 3.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-6.4.1
  • WordPress version: 6.3.1
  • First release: Jan 25, 2023
  • Latest release: Nov 22, 2023
  • Number of updates: 19
  • Update frequency: every 16.1 days
  • Top authors: etruel (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

20+ active /3,266 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.82MB] [CPU: ▲5.09ms] Passed 4 tests

Analyzing server-side resources used by Flash Cache
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.33 ▲0.8748.80 ▲1.38
Dashboard /wp-admin4.16 ▲0.8555.70 ▲7.34
Posts /wp-admin/edit.php4.21 ▲0.8550.54 ▲4.14
Add New Post /wp-admin/post-new.php6.68 ▲0.7997.83 ▲7.50
Media Library /wp-admin/upload.php4.02 ▲0.7943.09 ▲10.41
Patterns /wp-admin/edit.php?post_type=flash_cache_patterns4.1950.83
Preload /wp-admin/admin.php?page=flash_cache_preload3.9940.99
Advanced options /wp-admin/admin.php?page=flash_cache_advanced_setting3.9936.11
Flash Cache /wp-admin/admin.php?page=flash_cache_setting3.9938.03
Add New Patterns /wp-admin/post-new.php?post_type=flash_cache_patterns4.2278.52

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 27 new files
Database: no new tables, 7 new options
New WordPress options
flash_cache_version
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Flash Cache
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,851 ▲8914.20 ▼0.512.22 ▲0.6743.45 ▲5.35
Dashboard /wp-admin2,219 ▲425.56 ▼0.0589.49 ▼7.6167.94 ▲22.96
Posts /wp-admin/edit.php2,136 ▲361.98 ▼0.0239.84 ▲0.1433.26 ▼9.97
Add New Post /wp-admin/post-new.php1,572 ▲3323.08 ▼2.04662.56 ▲44.5653.24 ▼13.03
Media Library /wp-admin/upload.php1,430 ▲274.15 ▲0.0296.84 ▼2.9971.13 ▲26.79
Patterns /wp-admin/edit.php?post_type=flash_cache_patterns1,8112.0140.3845.37
Preload /wp-admin/admin.php?page=flash_cache_preload1,0802.0642.9137.81
Advanced options /wp-admin/admin.php?page=flash_cache_advanced_setting1,2761.7228.7638.40
Flash Cache /wp-admin/admin.php?page=flash_cache_setting1,0032.0826.7335.90
Add New Patterns /wp-admin/post-new.php?post_type=flash_cache_patterns1,7792.4650.0461.80

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/flash-cache/includes/functions.php+633
    Undefined index: lock_type
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please 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/flash-cache/includes/preload.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/flash-cache/includes/functions.php:102

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 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (Advanced Settings.) image missing
You can take inspiration from this readme.txt

flash-cache/flash_cache.php 85% from 13 tests

"Flash Cache" version 3.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("flash-cache.php" instead of "flash_cache.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 155 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin4,613 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP156648093,848
CSS229659
JavaScript19462
Markdown128044

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.38
Average class complexity34.69
▷ Minimum class complexity1.00
▷ Maximum class complexity133.00
Average method complexity5.29
▷ Minimum method complexity1.00
▷ Maximum method complexity52.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes00.00%
Methods125
▷ Static methods11491.20%
▷ Public methods11088.00%
▷ Protected methods97.20%
▷ Private methods64.80%
Functions39
▷ Named functions3897.44%
▷ Anonymous functions12.56%
Constants10
▷ Global constants550.00%
▷ Class constants550.00%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/flash-cache-icon.png1.13KB0.98KB▼ 13.42%