10% dedicated-transients

Code Review | Dedicated Transients

WordPress plugin Dedicated Transients scored 10% from 54 tests.

About plugin

  • Plugin page: dedicated-transients
  • Plugin version: 0.1.10
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-4.9.4
  • WordPress version: 5.8.1
  • First release: Aug 8, 2017
  • Latest release: Jul 28, 2019
  • Number of updates: 27
  • Update frequency: every 26.6 days
  • Top authors: pcfreak30 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

50+ active / 1,557 total downloads

Benchmarks

Plugin footprint 75% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
  • The plugin did not install without errors
    • > Warning in wp-admin/includes/class-wp-filesystem-direct.php+542
    Use of undefined constant FS_CHMOD_DIR - assumed 'FS_CHMOD_DIR' (this will throw an Error in a future version of PHP)

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

Server-side resources used by Dedicated Transients
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.88 ▲0.0433.04 ▲6.22
Dashboard /wp-admin3.10 ▲0.0337.64 ▼4.19
Posts /wp-admin/edit.php3.16 ▲0.0437.85 ▲3.74
Add New Post /wp-admin/post-new.php5.48 ▲0.041,038.27 ▲353.43
Media Library /wp-admin/upload.php3.05 ▲0.0435.09 ▲11.12

Server storage [IO: ▲0.05MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
It is recommended to fix the following issues
  • Illegal file modification detected: 1 file (1.27KB) outside of "wp-content/plugins/dedicated-transients/" and "wp-content/uploads/"
    • (new file) wp-content/mu-plugins/0_dedicated_transients.php
Filesystem: 5 new files
Database: 1 new table, no new options
New tables
wp_transients

Browser metrics Passed 4 tests

A check of browser resources used by Dedicated Transients
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,705 ▲10415.67 ▲0.399.16 ▲3.9077.90 ▲0.90
Dashboard /wp-admin2,909 ▲136.09 ▼0.12127.12 ▼4.04175.64 ▲6.39
Posts /wp-admin/edit.php2,750 ▲133.24 ▲0.0063.10 ▼1.19130.92 ▼6.17
Add New Post /wp-admin/post-new.php3,920 ▲11219.20 ▲0.08457.25 ▼18.57175.49 ▼3.38
Media Library /wp-admin/upload.php1,762 ▲135.47 ▲0.00153.57 ▲12.56187.79 ▲8.02

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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
The following issues need your attention
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/dedicated-transients/0_dedicated_transients.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/dedicated-transients/dedicated-transients.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === dedicated-transients === )
You can take inspiration from this readme.txt

dedicated-transients/dedicated-transients.php Passed 13 tests

The main PHP file in "Dedicated Transients" ver. 0.1.10 adds more information about the plugin and also serves as the entry point for this plugin
66 characters long description:
WordPress plugin to re-route transient storage to dedicated tables

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin251 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP34474251

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.41
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%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin