94% shortcache

Code Review | ShortCache

WordPress plugin ShortCache scored 94% from 53 tests.

About plugin

  • Plugin page: shortcache
  • Plugin version: 0.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.9
  • WordPress version: 5.8.1
  • First release: Jun 16, 2017
  • Latest release: Feb 8, 2018
  • Number of updates: 5
  • Update frequency: every 85.6 days
  • Top authors: deployer (60%)ideag (60%)

Code review

53 tests

User reviews

1 review

Install metrics

10+ active / 680 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼268.03ms] Passed 4 tests

This is a short check of server-side resources used by ShortCache
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1232.24 ▲11.12
Dashboard /wp-admin3.08 ▲0.0240.41 ▼1.37
Posts /wp-admin/edit.php3.13 ▲0.0246.72 ▲2.41
Add New Post /wp-admin/post-new.php5.44 ▲0.0197.25 ▼1,063.89
Media Library /wp-admin/upload.php3.02 ▲0.0131.68 ▼9.27
ShortCache /wp-admin/options-general.php?page=shortcache-settings2.9929.78

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by ShortCache
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,678 ▲7215.83 ▲0.308.26 ▼0.2145.94 ▲1.44
Dashboard /wp-admin2,932 ▲795.93 ▲0.06155.95 ▲17.84100.83 ▼3.85
Posts /wp-admin/edit.php2,708 ▲22.69 ▲0.0068.31 ▲4.1689.47 ▼6.70
Add New Post /wp-admin/post-new.php1,654 ▼317.47 ▼1.38343.34 ▼34.12101.24 ▼2.09
Media Library /wp-admin/upload.php1,774 ▲25.03 ▲0.04149.55 ▼20.11115.66 ▲0.73
ShortCache /wp-admin/options-general.php?page=shortcache-settings1,0532.0953.0471.40

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
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 fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/shortcache/shortcache.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: shortcode, shortcode caching, caching, cache

shortcache/shortcache.php Passed 13 tests

"ShortCache" version 0.2.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
33 characters long description:
A shortcode fragment cache plugin

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin552 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP318144552

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity36.00
▷ Minimum class complexity27.00
▷ Maximum class complexity45.00
Average method complexity3.33
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods30
▷ Static methods1653.33%
▷ Public methods1963.33%
▷ Protected methods00.00%
▷ Private methods1136.67%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected