78% rapid-cache

Code Review | Rapid Cache

WordPress plugin Rapid Cache scored78%from 54 tests.

About plugin

  • Plugin page: rapid-cache
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-6.3
  • WordPress version: 6.3.1
  • First release: Sep 12, 2020
  • Latest release: Sep 5, 2023
  • Number of updates: 14
  • Update frequency: every 77.9 days
  • Top authors: megaoptim (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

300+ active /4,097 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.20MB] [CPU: ▼4.24ms] Passed 4 tests

An overview of server-side resources used by Rapid Cache
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.71 ▲0.2439.98 ▲0.26
Dashboard /wp-admin3.51 ▲0.1646.68 ▼14.07
Posts /wp-admin/edit.php4.05 ▲0.6953.22 ▲5.95
Add New Post /wp-admin/post-new.php6.10 ▲0.2186.92 ▼9.09
Media Library /wp-admin/upload.php3.44 ▲0.2040.78 ▲6.24

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

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

Browser metrics Passed 4 tests

Rapid Cache: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.34 ▼0.281.68 ▼0.0142.11 ▼1.81
Dashboard /wp-admin2,207 ▲265.57 ▼0.1582.49 ▼33.0864.97 ▲21.46
Posts /wp-admin/edit.php2,118 ▲182.11 ▲0.0834.42 ▼3.5632.79 ▼2.18
Add New Post /wp-admin/post-new.php1,692 ▲16622.23 ▼1.43765.60 ▲116.6560.06 ▲2.80
Media Library /wp-admin/upload.php1,412 ▲124.21 ▲0.0296.62 ▼9.8277.63 ▲32.87

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 0% 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
The following issues need your attention
  • 6× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/rapid-cache/includes/stub.php
    • > /wp-content/plugins/rapid-cache/includes/plugin.php
    • > /wp-content/plugins/rapid-cache/rapid-cache.php
    • > /wp-content/plugins/rapid-cache/includes/uninstall.php
    • > /wp-content/plugins/rapid-cache/requirements.php
    • > /wp-content/plugins/rapid-cache/uninstall.php
  • 10× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'MegaOptim\\RapidCache\\Classes\\AbsBase' not found in wp-content/plugins/rapid-cache/includes/src/Classes/AbsBaseAp.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'MegaOptim\\RapidCache\\Classes\\AbsBase' not found in wp-content/plugins/rapid-cache/includes/src/Classes/Notes.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'MegaOptim\\RapidCache\\Classes\\AbsBase' not found in wp-content/plugins/rapid-cache/includes/src/Classes/VsUpgrades.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'MegaOptim\\RapidCache\\Classes\\AbsBase' not found in wp-content/plugins/rapid-cache/includes/src/Classes/MenuPage.php:18
    • > PHP Fatal error
      Uncaught Error: Interface 'MegaOptim\\RapidCache\\Interfaces\\Shared\cDebugConsts' not found in wp-content/plugins/rapid-cache/includes/src/Classes/AbsBase.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'MegaOptim\\RapidCache\\Classes\\AbsBaseAp' not found in wp-content/plugins/rapid-cache/includes/src/Classes/AdvancedCache.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'MegaOptim\\RapidCache\\Classes\\AbsBaseAp' not found in wp-content/plugins/rapid-cache/includes/src/Classes/Plugin.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'MegaOptim\\RapidCache\\Classes\\AbsBase' not found in wp-content/plugins/rapid-cache/includes/src/Classes/FeedUtils.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'MegaOptim\\RapidCache\\Classes\\AbsBase' not found in wp-content/plugins/rapid-cache/includes/src/Classes/Actions.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'MegaOptim\\RapidCache\\Classes\\MenuPage' not found in wp-content/plugins/rapid-cache/includes/src/Classes/MenuPageOptions.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

rapid-cache/rapid-cache.php Passed 13 tests

The principal PHP file in "Rapid Cache" v. 1.1.0 is loaded by WordPress automatically on each request
96 characters long description:
Rapid Cache is fork of Commet Cache and advanced WordPress caching plugin inspired by simplicity

Code Analysis 97% from 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 plugin13,702 lines of code in 111 files:
LanguageFilesBlank linesComment linesLines of code
PHP981,9214,65912,371
SVG100779
JavaScript4880385
JSON300154
Markdown1409
CSS4224

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
These items need your attention
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 147)
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity27.86
▷ Minimum class complexity1.00
▷ Maximum class complexity153.00
Average method complexity6.81
▷ Minimum method complexity1.00
▷ Maximum method complexity147.00
Code structure
Namespaces9
Interfaces2
Traits60
Classes19
▷ Abstract classes210.53%
▷ Concrete classes1789.47%
▷ Final classes15.88%
Methods373
▷ Static methods7018.77%
▷ Public methods34893.30%
▷ Protected methods174.56%
▷ Private methods82.14%
Functions62
▷ Named functions5283.87%
▷ Anonymous functions1016.13%
Constants67
▷ Global constants1623.88%
▷ Class constants5176.12%
▷ Public constants51100.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
24 PNG files occupy 0.29MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/source-code-ss.png14.94KB5.16KB▼ 65.47%
assets/images/options-logo.png10.64KB4.07KB▼ 61.78%
assets/images/bg.png5.40KB5.40KB0.04%
assets/images/tach.png7.37KB7.37KB0.04%
assets/images/logo-menu.png4.39KB0.90KB▼ 79.50%