78% tribe-object-cache

Code Review | Tribe Object Cache

WordPress plugin Tribe Object Cache scored78%from 54 tests.

About plugin

  • Plugin page: tribe-object-cache
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.4
  • WordPress version: 6.3.1
  • First release: May 25, 2012
  • Latest release: Jun 16, 2012
  • Number of updates: 23
  • Update frequency: every 4.3 days
  • Top authors: ModernTribe (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /8,468 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.06MB] [CPU: ▲984.56ms] 75% from 4 tests

An overview of server-side resources used by Tribe Object Cache
The following require your attention
  • Extra CPU: The extra CPU usage must be under 200.00ms (currently 984.56ms on /wp-admin/upload.php)
PageMemory (MB)CPU Time (ms)
Home /3.46 ▼0.0038.85 ▼7.34
Dashboard /wp-admin7.33 ▲4.031,624.14 ▲1,564.07
Posts /wp-admin/edit.php3.48 ▲0.121,373.17 ▲1,324.64
Add New Post /wp-admin/post-new.php5.95 ▲0.071,425.65 ▲1,335.77
Media Library /wp-admin/upload.php3.29 ▲0.061,326.16 ▲1,285.18

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

Filesystem and database footprint
Please fix the following
  • Illegal file modification found: 1 file (0.85KB) outside of "wp-content/plugins/tribe-object-cache/" and "wp-content/uploads/"
    • (new file) wp-content/object-cache.php
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Tribe Object Cache
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,740 ▼2114.44 ▲0.091.94 ▲0.3740.82 ▼2.60
Dashboard /wp-admin2,154 ▼265.51 ▼0.0793.36 ▼1.2840.24 ▼0.29
Posts /wp-admin/edit.php2,100 ▼01.97 ▼0.0535.31 ▲0.7936.74 ▼1.87
Add New Post /wp-admin/post-new.php1,526 ▼523.10 ▼0.03650.44 ▲15.2959.81 ▼1.11
Media Library /wp-admin/upload.php1,403 ▲34.18 ▼0.01105.03 ▼11.9142.85 ▼6.25

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 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)
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/tribe-object-cache/tribe-object-cache.php
  • 7× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/tribe-object-cache/lib/wincache/object-cache.php:18
    • > PHP Warning
      Use of undefined constant WP_CONTENT_DIR - assumed 'WP_CONTENT_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/tribe-object-cache/lib/object-cache.php on line 9
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHWPINC/cache.php' (include_path='.:/usr/share/php') in wp-content/plugins/tribe-object-cache/lib/object-cache.php on line 33
    • > PHP Warning
      Use of undefined constant WPINC - assumed 'WPINC' (this will throw an Error in a future version of PHP) in wp-content/plugins/tribe-object-cache/lib/object-cache.php on line 33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/tribe-object-cache/lib/apc/object-cache.php:19
    • > PHP Warning
      require_once(ABSPATHWPINC/cache.php): failed to open stream: No such file or directory in wp-content/plugins/tribe-object-cache/lib/object-cache.php on line 33
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/tribe-object-cache/lib/object-cache.php on line 33

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
10 plugin tags: batcache, memcached, apc, object cache, xcache...

tribe-object-cache/tribe-object-cache.php Passed 13 tests

The primary PHP file in "Tribe Object Cache" version 1.0.4 is used by WordPress to initiate all plugin functionality
119 characters long description:
Simple plugin that supports Memcached, APC, Xcache or WinCache based on your system. All you have to do is activate it.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin983 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP629379983

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity22.43
▷ Minimum class complexity1.00
▷ Maximum class complexity49.00
Average method complexity3.34
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods64
▷ Static methods00.00%
▷ Public methods6398.44%
▷ Protected methods00.00%
▷ Private methods11.56%
Functions52
▷ Named functions52100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
No PNG images were found in this plugin