78% quantumcloud-pagespeed-friendly-analytics-tracking

Code Review | QuantumCloud PageSpeed Friendly Analytics Tracking

WordPress plugin QuantumCloud PageSpeed Friendly Analytics Tracking scored78%from 54 tests.

About plugin

  • Plugin page: quantumcloud-page...
  • Plugin version: 1.2.0
  • PHP compatiblity: 5.4.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.1
  • WordPress version: 6.3.1
  • First release: Oct 3, 2016
  • Latest release: Nov 3, 2022
  • Number of updates: 15
  • Update frequency: every 148.1 days
  • Top authors: quantumcloud (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,415 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.01ms] Passed 4 tests

An overview of server-side resources used by QuantumCloud PageSpeed Friendly Analytics Tracking
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0439.17 ▼8.20
Dashboard /wp-admin3.34 ▲0.0344.88 ▼5.94
Posts /wp-admin/edit.php3.39 ▲0.0347.63 ▲1.66
Add New Post /wp-admin/post-new.php5.92 ▲0.0394.64 ▲4.45
Media Library /wp-admin/upload.php3.26 ▲0.0334.02 ▲0.43
QC Google Analytics /wp-admin/options-general.php?page=pc_google_analytics_settings3.2330.91

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 14 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
pc_google_analytics_version
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for QuantumCloud PageSpeed Friendly Analytics Tracking
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲9414.48 ▲0.091.88 ▼0.1738.57 ▼9.53
Dashboard /wp-admin2,210 ▲194.84 ▼1.09110.21 ▼4.9942.27 ▼6.65
Posts /wp-admin/edit.php2,093 ▲72.02 ▼0.0340.41 ▲2.7734.94 ▼1.26
Add New Post /wp-admin/post-new.php1,517 ▲323.47 ▲5.93747.25 ▲62.1558.77 ▲6.31
Media Library /wp-admin/upload.php1,392 ▲44.21 ▲0.1098.32 ▼16.3540.68 ▼7.03
QC Google Analytics /wp-admin/options-general.php?page=pc_google_analytics_settings1,0793.1452.4957.57

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 7 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • pc_google_analytics_version

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=pc_google_analytics_settings
    • > Warning in wp-content/plugins/quantumcloud-pagespeed-friendly-analytics-tracking/inc/class-qc-google-analytics-tracking-settings.php+224
    Use of undefined constant QCCLR_ASSETS_URL - assumed 'QCCLR_ASSETS_URL' (this will throw an Error in a future version of PHP)

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following browser errors
    • > GET request to /wp-admin/options-general.php?page=pc_google_analytics_settings
    • > Network (severe)
    wp-admin/QCCLR_ASSETS_URL/img/qc-logo-full.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
10 plugin tags: google analytics, pagespeed, analytics tracker, pagespeed score, leverarge browser caching...

quantumcloud-pagespeed-friendly-analytics-tracking/qc-google-analytics-main.php 77% from 13 tests

This is the main PHP file of "QuantumCloud PageSpeed Friendly Analytics Tracking" version 1.2.0, 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:
  • Main file name: The principal plugin file should be the same as the plugin slug ("quantumcloud-pagespeed-friendly-analytics-tracking.php" instead of "qc-google-analytics-main.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 238 characters long)
  • Requires at least: The required version number must match the one declared in readme.txt ("4.0" instead of "3.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin607 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP5197331556
JavaScript215651

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity32.00
▷ Minimum class complexity11.00
▷ Maximum class complexity62.00
Average method complexity3.82
▷ Minimum method complexity1.00
▷ Maximum method complexity44.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods33
▷ Static methods26.06%
▷ Public methods3193.94%
▷ Protected methods00.00%
▷ Private methods26.06%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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 files were detected