58% cache-ultra

Code Review | Cache Ultra

WordPress plugin Cache Ultra scored 58% from 54 tests.

About plugin

  • Plugin page: cache-ultra
  • Plugin version: 1.1.11
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.2.3
  • WordPress version: 6.3.1
  • First release: Oct 7, 2019
  • Latest release: Oct 29, 2019
  • Number of updates: 27
  • Update frequency: every 0.8 days
  • Top authors: limelightdept (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 3,110 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.59MB] [CPU: ▲1.36ms] Passed 4 tests

Analyzing server-side resources used by Cache Ultra
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.04 ▲0.5842.73 ▼2.14
Dashboard /wp-admin3.87 ▲0.5753.03 ▲6.33
Posts /wp-admin/edit.php3.98 ▲0.6255.00 ▲11.20
Add New Post /wp-admin/post-new.php6.74 ▲0.85103.87 ▼3.07
Media Library /wp-admin/upload.php3.80 ▲0.5738.55 ▲4.31
Page Caches /wp-admin/admin.php?page=cache-ultra3.8240.83
Custom Caches /wp-admin/admin.php?page=custom-caches3.8236.64
Post Type Caches /wp-admin/admin.php?page=post-type-caches3.8237.74

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 1,677 new files
Database: 2 new tables, 7 new options
New tables
wp_cu_resources
wp_cu_caches
New WordPress options
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts
_cu_plugin_version
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Cache Ultra
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲7413.20 ▼1.381.72 ▼0.4138.54 ▼4.91
Dashboard /wp-admin2,237 ▲494.87 ▲0.04107.13 ▼12.7641.90 ▼2.99
Posts /wp-admin/edit.php2,324 ▲2354.80 ▲2.76107.70 ▲68.4486.81 ▲52.65
Add New Post /wp-admin/post-new.php1,854 ▲31224.32 ▲6.12693.96 ▲82.3066.70 ▲12.87
Media Library /wp-admin/upload.php1,419 ▲314.19 ▼0.08112.87 ▲12.0146.24 ▲0.66
Page Caches /wp-admin/admin.php?page=cache-ultra9264.2390.2137.62
Custom Caches /wp-admin/admin.php?page=custom-caches9184.1384.5042.32
Post Type Caches /wp-admin/admin.php?page=post-type-caches9573.7447.1146.55

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure failed, leaving 2 tables in the database
    • wp_cu_caches
    • wp_cu_resources
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • _cu_plugin_version

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/cache-ultra/vendor/symfony/translation/Resources/bin/translation-status.php
  • 446× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/cache-ultra/vendor/lcobucci/jwt/test/unit/Signer/Ecdsa/Sha512Test.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Illuminate\\Support\\Facades\\Facade' not found in wp-content/plugins/cache-ultra/vendor/illuminate/support/Facades/Config.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Translation\\PluralizationRules' not found in wp-content/plugins/cache-ultra/vendor/nesbot/carbon/src/Carbon/Lang/sh.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Translation\\PluralizationRules' not found in wp-content/plugins/cache-ultra/vendor/nesbot/carbon/src/Carbon/Lang/uz.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/cache-ultra/vendor/lcobucci/jwt/test/unit/Claim/BasicTest.php:14
    • > PHP Fatal error
      Trait 'Carbon\\Traits\\Boundaries' not found in wp-content/plugins/cache-ultra/vendor/nesbot/carbon/src/Carbon/Traits/Date.php on line 517
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/cache-ultra/vendor/symfony/translation/Tests/Loader/PhpFileLoaderTest.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/cache-ultra/vendor/lcobucci/jwt/test/unit/Signer/Rsa/Sha256Test.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Translation\\PluralizationRules' not found in wp-content/plugins/cache-ultra/vendor/nesbot/carbon/src/Carbon/Lang/ga.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/cache-ultra/vendor/lcobucci/jwt/test/unit/SignatureTest.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Donate link: Please fix this invalid URI: ""
You can take inspiration from this readme.txt

cache-ultra/index.php 92% from 13 tests

The entry point to "Cache Ultra" version 1.1.11 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("cache-ultra.php" instead of "index.php")

Code Analysis 3% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
It is important to fix the following items
  • Do not include executable or dangerous files in your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/cache-ultra/vendor/nesbot/carbon/bin/carbon.bat
      • wp-content/plugins/cache-ultra/vendor/bin/carbon.bat
83,479 lines of code in 1,418 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,30216,24556,82370,846
Markdown331,52904,395
XSD392482,803
JSON25002,109
JavaScript41,3281,8842,033
CSS4890612
XML2250481
YAML1251104
PO File710551
Qt Linguist10021
make1409
DOS Batch2008
Bourne Shell1316
INI1001

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
It is recommended to fix the following
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 159)
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity9.47
▷ Minimum class complexity1.00
▷ Maximum class complexity272.00
Average method complexity2.02
▷ Minimum method complexity1.00
▷ Maximum method complexity159.00
Code structure
Namespaces120
Interfaces133
Traits49
Classes471
▷ Abstract classes245.10%
▷ Concrete classes44794.90%
▷ Final classes143.13%
Methods6,137
▷ Static methods71311.62%
▷ Public methods4,97881.11%
▷ Protected methods91714.94%
▷ Private methods2423.94%
Functions717
▷ Named functions13018.13%
▷ Anonymous functions58781.87%
Constants167
▷ Global constants169.58%
▷ Class constants15190.42%
▷ Public constants14998.68%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin