93% wca-google-tools-extension

Code Review | WCA: Google Tools Extension

WordPress plugin WCA: Google Tools Extension scored 93% from 54 tests.

About plugin

  • Plugin page: wca-google-tools-...
  • Plugin version: 2.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.9
  • WordPress version: 5.9.2
  • First release: Mar 24, 2020
  • Latest release: Feb 2, 2022
  • Number of updates: 61
  • Update frequency: every 11.2 days
  • Top authors: vbmv (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 456 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▼0.02MB] [CPU: ▼294.03ms] Passed 4 tests

Server-side resources used by WCA: Google Tools Extension
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0153.07 ▲2.21
Dashboard /wp-admin3.41 ▲0.0031.87 ▼1.53
Posts /wp-admin/edit.php3.64 ▲0.0037.91 ▼18.50
Add New Post /wp-admin/post-new.php6.88 ▼0.0989.67 ▼1,154.72
Media Library /wp-admin/upload.php3.29 ▲0.0023.84 ▼1.36

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 22 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for WCA: Google Tools Extension
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,767 ▲2116.22 ▲0.255.54 ▼1.322.05 ▼0.13
Dashboard /wp-admin2,892 ▲346.13 ▼0.04117.07 ▼19.81152.50 ▼15.05
Posts /wp-admin/edit.php2,688 ▲33.24 ▲0.0162.85 ▼2.84140.74 ▼7.84
Add New Post /wp-admin/post-new.php1,661 ▼11216.24 ▼5.16432.00 ▼37.94156.53 ▼2.63
Media Library /wp-admin/upload.php1,698 ▼05.52 ▲0.05157.15 ▲9.17184.48 ▼2.11

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Interface 'WeCodeArt\\Integration' not found in wp-content/plugins/wca-google-tools-extension/includes/class-google.php:35
    • > PHP Fatal error
      Trait 'WeCodeArt\\Singleton' not found in wp-content/plugins/wca-google-tools-extension/includes/class-loader.php on line 26
    • > PHP Fatal error
      Trait 'WeCodeArt\\Singleton' not found in wp-content/plugins/wca-google-tools-extension/includes/class-i18n.php on line 29

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: google analytics, google webmaster tools, google adsense

wca-google-tools-extension/wca-google.php 77% from 13 tests

The main PHP script in "WCA: Google Tools Extension" version 2.0.1 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Description: The description should be shorter than 140 characters (currently 156 characters long)
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("wca-google-tools-extension.php" instead of "wca-google.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected731 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP13122572365
JavaScript28593325
PO File181041

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.18
Average class complexity3.88
▷ Minimum class complexity1.00
▷ Maximum class complexity8.00
Average method complexity1.46
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods31
▷ Static methods39.68%
▷ Public methods2270.97%
▷ Protected methods39.68%
▷ Private methods619.35%
Functions7
▷ Named functions228.57%
▷ Anonymous functions571.43%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.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 images were found in this plugin