83% gocache-cdn

Code Review | GoCache

WordPress plugin GoCache scored83%from 54 tests.

About plugin

  • Plugin page: gocache-cdn
  • Plugin version: 1.3.5
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.3
  • WordPress version: 6.3.1
  • First release: Aug 26, 2016
  • Latest release: Oct 23, 2023
  • Number of updates: 55
  • Update frequency: every 47.6 days
  • Top authors: apiki (100%)

Code review

54 tests

User reviews

1 review

Install metrics

4,000+ active /39,482 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.37MB] [CPU: ▲1.83ms] Passed 4 tests

Server-side resources used by GoCache
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.88 ▲0.4244.60 ▲7.17
Dashboard /wp-admin3.70 ▲0.4051.34 ▲2.99
Posts /wp-admin/edit.php3.76 ▲0.4046.93 ▼1.00
Add New Post /wp-admin/post-new.php6.24 ▲0.3682.76 ▼0.47
Media Library /wp-admin/upload.php3.57 ▲0.3440.23 ▲5.80
Start /wp-admin/admin.php?page=gocache-manager-settings3.5337.03
Authentication /wp-admin/admin.php?page=gocache-managerauthenticate-settings3.5134.22

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 81 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
gocache_option-status
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by GoCache
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲7013.26 ▼1.104.19 ▲2.6242.76 ▼1.46
Dashboard /wp-admin2,234 ▲535.75 ▲0.0396.92 ▲1.1888.25 ▲44.27
Posts /wp-admin/edit.php2,152 ▲522.33 ▲0.3040.95 ▲4.0932.41 ▼3.21
Add New Post /wp-admin/post-new.php1,717 ▲18022.54 ▲4.35710.41 ▲94.4459.56 ▼17.07
Media Library /wp-admin/upload.php1,439 ▲394.44 ▲0.2299.52 ▲3.8277.55 ▲33.69
Start /wp-admin/admin.php?page=gocache-manager-settings8461.9032.2826.75
Authentication /wp-admin/admin.php?page=gocache-managerauthenticate-settings9112.0425.9631.50

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • gocache_option-status
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=gocache-managerauthenticate-settings
    • > Notice in wp-content/plugins/gocache-cdn/Controller/authentication.php+22
    Trying to access array offset on value of type null
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=gocache-managerauthenticate-settings
    • > Notice in wp-content/plugins/gocache-cdn/Controller/authentication.php+32
    Trying to get property 'status_code' of non-object

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Screenshots: Add an image for screenshot #1 (Tela de autenticação do plugin)
You can take inspiration from this readme.txt

gocache-cdn/gocache-manager.php 77% from 13 tests

The primary PHP file in "GoCache" version 1.3.5 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("gocache-cdn.php" instead of "gocache-manager.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Description: Please don't use more than 140 characters for the plugin description (currently 178 characters long)

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
There were no executable files found in this plugin3,440 lines of code in 47 files:
LanguageFilesBlank linesComment linesLines of code
PHP174681321,678
JavaScript23308591,089
SVG200360
PO File18693201
Sass28049
CSS15938
JSON10025

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity14.17
▷ Minimum class complexity1.00
▷ Maximum class complexity56.00
Average method complexity2.45
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes12
▷ Abstract classes18.33%
▷ Concrete classes1191.67%
▷ Final classes00.00%
Methods104
▷ Static methods3937.50%
▷ Public methods8076.92%
▷ Protected methods10.96%
▷ Private methods2322.12%
Functions3
▷ Named functions00.00%
▷ Anonymous functions3100.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.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
15 PNG files occupy 0.39MB with 0.19MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/chosen-sprite.png0.53KB0.88KB0.00%
assets/screenshot-2.png49.86KB16.60KB▼ 66.70%
screenshot-2.png49.86KB16.60KB▼ 66.70%
screenshot-3.png77.06KB32.09KB▼ 58.35%
assets/icon-256x256.png13.26KB5.80KB▼ 56.28%