84% focus-object-cache

Code Review | FOCUS Cache

WordPress plugin FOCUS Cache scored84%from 54 tests.

About plugin

  • Plugin page: focus-object-cache
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3.11-4.8
  • WordPress version: 6.3.1
  • First release: Jun 22, 2017
  • Latest release: Jun 23, 2017
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: emrikol (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,188 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
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by FOCUS Cache
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0235.76 ▼4.68
Dashboard /wp-admin3.32 ▲0.0245.18 ▼2.94
Posts /wp-admin/edit.php3.37 ▲0.0146.72 ▼2.96
Add New Post /wp-admin/post-new.php5.90 ▲0.0182.77 ▼14.96
Media Library /wp-admin/upload.php3.24 ▲0.0134.48 ▼0.64
FOCUS Cache /wp-admin/options-general.php?page=focus-cache3.2528.50

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

FOCUS Cache: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4714.44 ▲0.061.77 ▼0.2141.33 ▼6.79
Dashboard /wp-admin2,210 ▲194.85 ▼0.27108.59 ▼1.1839.57 ▼4.76
Posts /wp-admin/edit.php2,096 ▲72.18 ▲0.1540.28 ▼1.2335.41 ▼0.14
Add New Post /wp-admin/post-new.php1,538 ▲1923.05 ▼0.20625.95 ▲12.8248.58 ▼4.77
Media Library /wp-admin/upload.php1,392 ▲44.25 ▲0.0698.02 ▼0.1941.55 ▲1.45
FOCUS Cache /wp-admin/options-general.php?page=focus-cache7752.0624.8528.06

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • 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
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 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
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      Use of undefined constant YEAR_IN_SECONDS - assumed 'YEAR_IN_SECONDS' (this will throw an Error in a future version of PHP) in wp-content/plugins/focus-object-cache/includes/object-cache.php on line 30

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
2 plugin tags: caching, cache

focus-object-cache/focus.php 85% from 13 tests

The principal PHP file in "FOCUS Cache" v. 1.0.1 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("focus-object-cache.php" instead of "focus.php")

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
There were no executable files found in this plugin671 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP3197801671

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity60.00
▷ Minimum class complexity59.00
▷ Maximum class complexity61.00
Average method complexity3.74
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods43
▷ Static methods00.00%
▷ Public methods3274.42%
▷ Protected methods1125.58%
▷ Private methods00.00%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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