62% octavius-rocks

Code Review | Octavius Rocks

WordPress plugin Octavius Rocks scored 62% from 54 tests.

About plugin

  • Plugin page: octavius-rocks
  • Plugin version: 3.9.3
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2.0
  • WordPress version: 6.3.1
  • First release: Apr 30, 2015
  • Latest release: Apr 27, 2023
  • Number of updates: 145
  • Update frequency: every 20.1 days
  • Top authors: EdwardBock (64.14%)Octavius.rocks (22.76%)Pixelwelt (14.48%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 3,274 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.17MB] [CPU: ▲3.08ms] Passed 4 tests

This is a short check of server-side resources used by Octavius Rocks
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.82 ▲0.3653.35 ▲8.24
Dashboard /wp-admin3.46 ▲0.1657.08 ▼17.62
Posts /wp-admin/edit.php3.58 ▲0.2358.96 ▲5.06
Add New Post /wp-admin/post-new.php6.03 ▲0.15112.16 ▲16.63
Media Library /wp-admin/upload.php3.38 ▲0.1552.28 ▲16.66
Dashboard /wp-admin/admin.php?page=octavius-rocks3.3847.37
Settings /wp-admin/admin.php?page=octavius-rocks-settings3.4452.79

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 137 new files
Database: 3 new tables, 11 new options
New tables
wp_octavius_rocks_queries
wp_octavius_rocks_pageviews
wp_octavius_rocks_taxonomy_term_views
New WordPress options
widget_octavius_rocks_most_read
widget_recent-posts
octavius_rocks_query_cache_update_last_run
octavius_rocks_pageviews_cache_last_import
octavius-rocks_data_version
_octavius_rocks_fetch_config_last_run
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
...

Browser metrics Passed 4 tests

Checking browser requirements for Octavius Rocks
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,884 ▲9513.55 ▼0.8511.86 ▲10.0645.64 ▼0.67
Dashboard /wp-admin2,250 ▲444.84 ▼0.02107.47 ▼9.5644.03 ▼7.45
Posts /wp-admin/edit.php2,193 ▲1044.79 ▲2.7892.12 ▲53.5335.63 ▲0.67
Add New Post /wp-admin/post-new.php1,733 ▲20527.99 ▲4.91713.59 ▲58.7731.45 ▼19.69
Media Library /wp-admin/upload.php1,414 ▲294.24 ▲0.0099.98 ▼4.3343.05 ▲0.85
Dashboard /wp-admin/admin.php?page=octavius-rocks1,1636.07109.2638.50
Settings /wp-admin/admin.php?page=octavius-rocks-settings9134.3654.4834.51

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 3 tables in the database
    • wp_octavius_rocks_queries
    • wp_octavius_rocks_pageviews
    • wp_octavius_rocks_taxonomy_term_views
  • This plugin did not uninstall successfully, leaving 11 options in the database
    • octavius-rocks_data_version
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • octavius_rocks_query_cache_update_last_run
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • _octavius_rocks_fetch_config_last_run
    • widget_octavius_rocks_most_read
    • ...

Smoke tests 25% 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 0% 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
Please fix the following items
  • 4× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/octavius-rocks/templates/blockx__octavius-rocks--most-read.php
    • > /wp-content/plugins/octavius-rocks/templates/blockx__octavius-rocks--most-read__editor.php
    • > /wp-content/plugins/octavius-rocks/parts/octavius-admin-pageviews.php
    • > /wp-content/plugins/octavius-rocks/parts/octavius-settings-tabs.php
  • 37× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/octavius-rocks/parts/octavius-overview.php:9
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/octavius-rocks/templates/most-read-widget.php on line 12
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/octavius-rocks/lib/octavius-admin-php/tests/server/AdminTest.php:18
    • > PHP Notice
      Undefined variable: query in wp-content/plugins/octavius-rocks/templates/most-read-widget.php on line 17
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/octavius-rocks/templates/blockx__octavius-rocks--most-read__editor.php on line 9
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/octavius-rocks/lib/octavius-admin-php/tests/serverless/OQLTest.php:20
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/octavius-rocks/parts/octavius-settings-tabs.php on line 12
    • > PHP Warning
      count(): Parameter must be an array or an object that implements Countable in wp-content/plugins/octavius-rocks/templates/blockx__octavius-rocks--most-read.php on line 13
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/octavius-rocks/lib/octavius-admin-php/tests/serverless/JavaScriptTest.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Palasthotel\\WordPress\\BlockX\\Blocks\\_BlockType' not found in wp-content/plugins/octavius-rocks/classes/BlockX/MostReadBlock.php:22

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following user-side errors
    • > GET request to /wp-admin/admin.php?page=octavius-rocks
    • > Network (severe)
    https://service.octavius.rocks/config/ - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=octavius-rocks
    • > Console-api (severe) in unknown
    /wp-content/plugins/octavius-rocks//dist/adminRocks.js?ver=53d85523e51d0a2f28b4 0:299182 i

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Screenshots: Screenshot #1 (Octavius Service) image missing
You can take inspiration from this readme.txt

octavius-rocks/octavius-client.php 85% from 13 tests

This is the main PHP file of "Octavius Rocks" version 3.9.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Requires at least: Required version must match the one declared in readme.txt ("4.0" instead of "5.0")
  • Main file name: Name the main plugin file the same as the plugin slug ("octavius-rocks.php" instead of "octavius-client.php")

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
There were no executable files found in this plugin7,405 lines of code in 117 files:
LanguageFilesBlank linesComment linesLines of code
PHP1081,6692,8356,949
PO File1163203369
Markdown128068
JavaScript50413
JSON1005
CSS1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity8.63
▷ Minimum class complexity1.00
▷ Maximum class complexity64.00
Average method complexity2.10
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces17
Interfaces0
Traits0
Classes83
▷ Abstract classes33.61%
▷ Concrete classes8096.39%
▷ Final classes1012.50%
Methods540
▷ Static methods519.44%
▷ Public methods51094.44%
▷ Protected methods00.00%
▷ Private methods305.56%
Functions37
▷ Named functions718.92%
▷ Anonymous functions3081.08%
Constants131
▷ Global constants00.00%
▷ Class constants131100.00%
▷ Public constants131100.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
There were not PNG files found in your plugin