84% function-cache

Code Review | Function Cache

WordPress plugin Function Cache scored84%from 54 tests.

About plugin

  • Plugin page: function-cache
  • Plugin version: 20150122...
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.1
  • WordPress version: 6.3.1
  • First release: Sep 28, 2015
  • Latest release: Sep 28, 2015
  • Number of updates: 2
  • Update frequency: every 2.0 days
  • Top authors: smithaa02 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /744 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.01MB] [CPU: ▼1.87ms] Passed 4 tests

An overview of server-side resources used by Function Cache
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0133.87 ▼6.08
Dashboard /wp-admin3.31 ▲0.0152.08 ▲2.43
Posts /wp-admin/edit.php3.36 ▲0.0149.51 ▼1.33
Add New Post /wp-admin/post-new.php5.89 ▲0.0196.07 ▲0.76
Media Library /wp-admin/upload.php3.23 ▲0.0134.99 ▼0.84

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: 1 new table, 7 new options
New tables
wp_function_cache
New WordPress options
function_cache_db
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Function Cache
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.37 ▼0.011.74 ▼0.1144.08 ▲2.85
Dashboard /wp-admin2,198 ▲215.64 ▲0.0584.96 ▼4.4639.88 ▼5.33
Posts /wp-admin/edit.php2,103 ▼01.97 ▼0.0741.97 ▼0.8834.38 ▼3.70
Add New Post /wp-admin/post-new.php1,547 ▲123.36 ▲0.21621.27 ▼51.3756.71 ▼4.31
Media Library /wp-admin/upload.php1,400 ▼04.20 ▼0.0097.11 ▼9.8542.66 ▼3.99

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% 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
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/function-cache/function-cache.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === function-cache === )
Please take inspiration from this readme.txt

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

The primary PHP file in "Function Cache" version 20150122... is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Version: Use periods and digits only for your plugin's version number (ex. "1.0.3" instead of "20150122...")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin64 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1282064

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods787.50%
▷ Public methods787.50%
▷ Protected methods00.00%
▷ Private methods112.50%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin