10% rocket24-analytics

Code Review | Rocket24 Analytics

WordPress plugin Rocket24 Analytics scored10%from 54 tests.

About plugin

  • Plugin page: rocket24-analytics
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.6.1
  • WordPress version: 6.3.1
  • First release: Oct 13, 2016
  • Latest release: Oct 13, 2016
  • Number of updates: 6
  • Update frequency: every 0.3 days
  • Top authors: tortlewortle (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /600 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
  • Install procedure had errors
    • > Compile error in wp-content/plugins/rocket24-analytics/vendor/vierbergenlars/php-semver/src/vierbergenlars/SemVer/internal.php+7
    Cannot use vierbergenlars\LibJs\Object as Object because 'Object' is a special class name

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.09ms] Passed 4 tests

This is a short check of server-side resources used by Rocket24 Analytics
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.37 ▼7.81
Dashboard /wp-admin3.31 ▲0.0051.02 ▼1.17
Posts /wp-admin/edit.php3.36 ▲0.0051.58 ▼7.54
Add New Post /wp-admin/post-new.php5.89 ▲0.00112.16 ▲15.50
Media Library /wp-admin/upload.php3.23 ▲0.0038.43 ▲0.17

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 2,440 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Rocket24 Analytics
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.34 ▼0.251.89 ▼0.0140.75 ▼2.60
Dashboard /wp-admin2,195 ▲215.54 ▼0.0587.53 ▼21.3140.22 ▼2.31
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0642.06 ▲2.4034.43 ▼3.63
Add New Post /wp-admin/post-new.php1,526 ▼123.01 ▼0.06634.19 ▼68.8058.82 ▲1.62
Media Library /wp-admin/upload.php1,394 ▼64.20 ▲0.01100.68 ▼23.0044.89 ▼3.90

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
  • 7× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/rocket24-analytics/vendor/google/apiclient/examples/url-shortener.php
    • > /wp-content/plugins/rocket24-analytics/vendor/firebase/php-jwt/tests/bootstrap.php
    • > /wp-content/plugins/rocket24-analytics/vendor/google/apiclient/examples/idtoken.php
    • > /wp-content/plugins/rocket24-analytics/vendor/google/apiclient/examples/multi-api.php
    • > /wp-content/plugins/rocket24-analytics/vendor/google/apiclient/examples/simple-file-upload.php
    • > /wp-content/plugins/rocket24-analytics/vendor/google/apiclient/examples/large-file-upload.php
    • > /wp-content/plugins/rocket24-analytics/vendor/google/apiclient/examples/index.php
  • 1283× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Node_Expression_Test' not found in wp-content/plugins/rocket24-analytics/vendor/twig/twig/lib/Twig/Node/Expression/Test/Sameas.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\HttpFoundation\\RequestMatcher' not found in wp-content/plugins/rocket24-analytics/vendor/symfony/http-foundation/ExpressionRequestMatcher.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\HttpFoundation\\ParameterBag' not found in wp-content/plugins/rocket24-analytics/vendor/symfony/http-foundation/ServerBag.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Collection' not found in wp-content/plugins/rocket24-analytics/vendor/google/apiclient-services/src/Google/Service/Analytics/Experiments.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'BaseTest' not found in wp-content/plugins/rocket24-analytics/vendor/google/apiclient/tests/examples/simpleQueryTest.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/rocket24-analytics/vendor/monolog/monolog/src/Monolog/Handler/PHPConsoleHandler.php:40
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\RequestInterface' not found in wp-content/plugins/rocket24-analytics/vendor/psr/http-message/src/ServerRequestInterface.php:43
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Collection' not found in wp-content/plugins/rocket24-analytics/vendor/google/apiclient-services/src/Google/Service/Analytics/GoalEventDetails.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\HttpFoundation\\Response' not found in wp-content/plugins/rocket24-analytics/vendor/symfony/http-foundation/JsonResponse.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/rocket24-analytics/vendor/symfony/http-foundation/Tests/Session/Storage/NativeSessionStorageTest.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 93% 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
Attributes that need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === rocket24-analytics === )
You can take inspiration from this readme.txt

rocket24-analytics/plugin.php 92% from 13 tests

The main file in "Rocket24 Analytics" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("rocket24-analytics.php" instead of "plugin.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin163,204 lines of code in 2,058 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,78130,91778,390145,899
Markdown561,79805,901
reStructuredText882,2912,0353,169
JSON38003,082
XSD392482,803
C22131821,015
XML315942764
YAML13512198
CSS3182688
C/C++ Header2192155
Twig137048
m42131246
PO File67037
Bourne Shell25434
JavaScript30023
HTML110017
Qt Linguist10010
make1409
INI2016

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
These items need your attention
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 155)
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity7.95
▷ Minimum class complexity1.00
▷ Maximum class complexity591.00
Average method complexity2.05
▷ Minimum method complexity1.00
▷ Maximum method complexity155.00
Code structure
Namespaces226
Interfaces172
Traits14
Classes1,597
▷ Abstract classes633.94%
▷ Concrete classes1,53496.06%
▷ Final classes161.04%
Methods12,475
▷ Static methods6214.98%
▷ Public methods10,73786.07%
▷ Protected methods1,27710.24%
▷ Private methods4613.70%
Functions1,043
▷ Named functions30329.05%
▷ Anonymous functions74070.95%
Constants624
▷ Global constants7612.18%
▷ Class constants54887.82%
▷ Public constants548100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected