89% detect-cache

Code Review | Detect Cache

WordPress plugin Detect Cache scored89%from 54 tests.

About plugin

  • Plugin page: detect-cache
  • Plugin version: 1.2.8
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.1
  • WordPress version: 6.3.1
  • First release: Oct 26, 2017
  • Latest release: Mar 14, 2023
  • Number of updates: 25
  • Update frequency: every 78.6 days
  • Top authors: shaneeckert (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,611 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.04MB] [CPU: ▼10.15ms] Passed 4 tests

An overview of server-side resources used by Detect Cache
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0535.90 ▼7.75
Dashboard /wp-admin3.36 ▲0.0144.86 ▼20.05
Posts /wp-admin/edit.php3.41 ▲0.0546.65 ▲0.31
Add New Post /wp-admin/post-new.php5.94 ▲0.0584.56 ▼13.11
Media Library /wp-admin/upload.php3.29 ▲0.0536.51 ▲3.51

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Detect Cache
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲7013.27 ▼1.014.67 ▲2.8539.81 ▼3.30
Dashboard /wp-admin2,219 ▲305.78 ▲0.8397.92 ▼23.4039.81 ▼5.76
Posts /wp-admin/edit.php2,108 ▲192.04 ▲0.0343.13 ▲7.9834.77 ▼0.24
Add New Post /wp-admin/post-new.php1,546 ▲2423.37 ▲0.01662.15 ▼28.2959.72 ▲0.13
Media Library /wp-admin/upload.php1,398 ▲104.18 ▲0.03101.72 ▼40.4143.31 ▼8.68

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === detect-cache === )
Please take inspiration from this readme.txt

detect-cache/detect-cache.php 92% from 13 tests

"Detect Cache" version 1.2.8's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/languages/")

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 plugin346 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP134108298
CSS14031
Markdown23017

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
There are no PNG files in this plugin