84% purge-o2switch-xtremcache

Code Review | o2switch XtremCache

WordPress plugin o2switch XtremCache scored84%from 54 tests.

About plugin

  • Plugin page: purge-o2switch-xt...
  • Plugin version: 1.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.0
  • WordPress version: 6.3.1
  • First release: Jul 30, 2018
  • Latest release: Jul 30, 2018
  • Number of updates: 6
  • Update frequency: every 0.7 days
  • Top authors: juliobox (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /1,507 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.57MB] [CPU: ▼11.04ms] Passed 4 tests

Server-side resources used by o2switch XtremCache
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0546.57 ▲0.86
Dashboard /wp-admin3.41 ▲0.1049.89 ▼2.39
Posts /wp-admin/edit.php3.52 ▲0.1653.45 ▲0.69
Add New Post /wp-admin/post-new.php3.37 ▼2.5268.23 ▼42.81
Media Library /wp-admin/upload.php3.33 ▲0.1037.32 ▲0.35
XtremCache /wp-admin/options-general.php?page=bawo2pc_settings3.3130.46

Server storage [IO: ▲0.03MB] [DB: ▲0.07MB] Passed 3 tests

Filesystem and database footprint
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
bawo2pc_settings
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for o2switch XtremCache
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.24 ▼0.471.70 ▼0.4040.19 ▼6.22
Dashboard /wp-admin2,196 ▲165.62 ▼0.0594.67 ▼3.6242.44 ▲0.67
Posts /wp-admin/edit.php2,104 ▲12.01 ▼0.0141.93 ▲5.6736.61 ▲2.61
Add New Post /wp-admin/post-new.php9 ▼1,5190.42 ▼22.570.10 ▼681.404.05 ▼60.06
Media Library /wp-admin/upload.php1,398 ▼24.16 ▼0.04103.65 ▼7.8563.14 ▲14.64
XtremCache /wp-admin/options-general.php?page=bawo2pc_settings1,0012.0426.1633.49

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

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

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 5× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/purge-o2switch-xtremcache/inc/fronck-end.php
    • > /wp-content/plugins/purge-o2switch-xtremcache/baw-o2-purge-cache.php
    • > /wp-content/plugins/purge-o2switch-xtremcache/inc/fields.php
    • > /wp-content/plugins/purge-o2switch-xtremcache/inc/back-end.php
    • > /wp-content/plugins/purge-o2switch-xtremcache/inc/front-end.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 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: xtremcache, cache, o2switch

purge-o2switch-xtremcache/baw-o2-purge-cache.php 92% from 13 tests

The principal PHP file in "o2switch XtremCache" v. 1.0 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("purge-o2switch-xtremcache.php" instead of "baw-o2-purge-cache.php")

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
There were no executable files found in this plugin452 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP548187366
PO File1303186

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.31
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%
Functions27
▷ Named functions27100.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
PNG images were not found in this plugin