90% lh-no-cache-shortcode

Code Review | LH No Cache Shortcode

WordPress plugin LH No Cache Shortcode scored90%from 54 tests.

About plugin

  • Plugin page: lh-no-cache-short...
  • Plugin version: 1.00
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.0
  • WordPress version: 6.3.1
  • First release: Sep 9, 2019
  • Latest release: Aug 1, 2022
  • Number of updates: 4
  • Update frequency: every 264.5 days
  • Top authors: shawfactor (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /591 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼8.90ms] Passed 4 tests

A check of server-side resources used by LH No Cache Shortcode
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0033.35 ▼7.56
Dashboard /wp-admin3.31 ▲0.0145.01 ▼11.18
Posts /wp-admin/edit.php3.36 ▲0.0047.57 ▼2.29
Add New Post /wp-admin/post-new.php5.89 ▲0.0077.60 ▼14.55
Media Library /wp-admin/upload.php3.23 ▲0.0038.28 ▲2.32

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

LH No Cache Shortcode: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲7914.45 ▼0.192.23 ▲0.2540.92 ▼3.49
Dashboard /wp-admin2,221 ▲154.84 ▼1.06112.60 ▲4.8442.32 ▼0.70
Posts /wp-admin/edit.php2,100 ▼02.06 ▲0.0439.64 ▲4.3036.14 ▲3.36
Add New Post /wp-admin/post-new.php1,526 ▲15617.71 ▲1.03671.43 ▲72.2262.65 ▲16.37
Media Library /wp-admin/upload.php1,403 ▼04.30 ▲0.12106.09 ▲6.1244.57 ▼0.07

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests Passed 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)
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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 SRP test was a success

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 Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: wp super cache, admin, posts, nocache, cache

lh-no-cache-shortcode/lh-no-cache-shortcode.php Passed 13 tests

The main PHP script in "LH No Cache Shortcode" version 1.00 is automatically included on every request by WordPress
78 characters long description:
A shrtcode to prevent WP Super Cache from caching a certain page, post, or cpt

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 plugin31 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2511631

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.40
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods120.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin