74% wp-lcache

Code Review | WP LCache

WordPress plugin WP LCache scored74%from 54 tests.

About plugin

  • Plugin page: wp-lcache
  • Plugin version: 0.6.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-5.2
  • WordPress version: 6.3.1
  • First release: Sep 8, 2016
  • Latest release: May 1, 2019
  • Number of updates: 44
  • Update frequency: every 22.3 days
  • Top authors: danielbachhuber (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

20+ active /10,859 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▲0.12ms] Passed 4 tests

Server-side resources used by WP LCache
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.41 ▼1.77
Dashboard /wp-admin3.31 ▲0.0148.07 ▼5.52
Posts /wp-admin/edit.php3.36 ▲0.0166.13 ▲12.32
Add New Post /wp-admin/post-new.php5.89 ▲0.01108.58 ▲7.11
Media Library /wp-admin/upload.php3.23 ▲0.0137.75 ▲0.65

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 39 new files
Database: 2 new tables, 6 new options
New tables
wp_lcache_tags
wp_lcache_events
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

WP LCache: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲6113.29 ▼1.151.89 ▲0.1043.34 ▼2.46
Dashboard /wp-admin2,213 ▲255.89 ▼0.0098.76 ▼8.0140.23 ▼4.86
Posts /wp-admin/edit.php2,098 ▲62.00 ▼0.0142.31 ▼1.0337.78 ▲0.83
Add New Post /wp-admin/post-new.php1,526 ▼723.21 ▲0.15678.68 ▲74.0952.89 ▲2.41
Media Library /wp-admin/upload.php1,398 ▲134.31 ▲0.0996.91 ▼3.7648.97 ▲6.09

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie tables were found after uninstall: 2 tables
    • wp_lcache_events
    • wp_lcache_tags
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

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)
Good news, no errors were detected

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 take a closer look at the following
  • 11× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'LCache\\StaticL1' not found in wp-content/plugins/wp-lcache/vendor/lcache/lcache/src/NullL1.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'LCache\\L1' not found in wp-content/plugins/wp-lcache/vendor/lcache/lcache/src/APCuL1.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'LCache\\L2' not found in wp-content/plugins/wp-lcache/vendor/lcache/lcache/src/DatabaseL2.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'LCache\\LX' not found in wp-content/plugins/wp-lcache/vendor/lcache/lcache/src/L1.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'LCache\\L1' not found in wp-content/plugins/wp-lcache/vendor/lcache/lcache/src/StaticL1.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'LCache\\StateL1Interface' not found in wp-content/plugins/wp-lcache/vendor/lcache/lcache/src/StateL1Static.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'LCache\\StateL1Interface' not found in wp-content/plugins/wp-lcache/vendor/lcache/lcache/src/StateL1APCu.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'LCache\\L1' not found in wp-content/plugins/wp-lcache/vendor/lcache/lcache/src/SQLiteL1.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'LCache\\L2' not found in wp-content/plugins/wp-lcache/vendor/lcache/lcache/src/StaticL2.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'LCache\\LX' not found in wp-content/plugins/wp-lcache/vendor/lcache/lcache/src/L2.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
7 plugin tags: cache, apcu, lcache, apc, object-cache...

wp-lcache/wp-lcache.php Passed 13 tests

"WP LCache" version 0.6.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
102 characters long description:
Supercharge your WP Object Cache with LCache, a persistent, performant, and multi-layer cache library.

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
Success! There were no dangerous files found in this plugin2,519 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
PHP274941,1322,342
JSON300115
YAML17328
XML10018
Markdown18016

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity16.73
▷ Minimum class complexity1.00
▷ Maximum class complexity132.00
Average method complexity2.80
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces2
Interfaces1
Traits0
Classes21
▷ Abstract classes314.29%
▷ Concrete classes1885.71%
▷ Final classes316.67%
Methods209
▷ Static methods104.78%
▷ Public methods17382.78%
▷ Protected methods3215.31%
▷ Private methods41.91%
Functions20
▷ Named functions1890.00%
▷ Anonymous functions210.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin