94% simple-google-content-experiments

Code Review | Simple Google Content Experiments

WordPress plugin Simple Google Content Experiments scored 94% from 54 tests.

About plugin

  • Plugin page: simple-google-con...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.2-5.8.1
  • WordPress version: 5.8.1
  • First release: Feb 26, 2016
  • Latest release: Oct 13, 2021
  • Number of updates: 15
  • Update frequency: every 137.1 days
  • Top authors: nateconley (60%)brandondove (46.67%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 2,960 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼146.74ms] Passed 4 tests

This is a short check of server-side resources used by Simple Google Content Experiments
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.89 ▲0.1737.05 ▲13.42
Dashboard /wp-admin3.11 ▲0.0645.97 ▼7.99
Posts /wp-admin/edit.php3.17 ▲0.0651.38 ▲4.76
Add New Post /wp-admin/post-new.php5.47 ▲0.0495.79 ▼583.10
Media Library /wp-admin/upload.php3.06 ▲0.0634.47 ▼0.62
Simple Google Content Experiments Changelog /wp-admin/admin.php?page=pj-sgce-changelog3.0331.20

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Simple Google Content Experiments
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲13115.80 ▲0.418.37 ▼5.9848.39 ▼0.82
Dashboard /wp-admin2,970 ▲345.88 ▼0.26144.34 ▼29.90112.16 ▼9.20
Posts /wp-admin/edit.php2,739 ▼02.72 ▼0.0076.34 ▲8.2186.72 ▼7.30
Add New Post /wp-admin/post-new.php1,672 ▲5718.80 ▼2.62398.82 ▲102.43119.51 ▲7.78
Media Library /wp-admin/upload.php1,807 ▼05.10 ▲0.05152.55 ▼21.59110.90 ▼4.84
Simple Google Content Experiments Changelog /wp-admin/admin.php?page=pj-sgce-changelog1,3092.2156.2070.38

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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 take a closer look at the following
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/simple-google-content-experiments/views/changelog.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/simple-google-content-experiments/lib/changelog.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/simple-google-content-experiments/simple-google-content-experiments.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: google analytics, content experiments, ab testing

simple-google-content-experiments/simple-google-content-experiments.php 92% from 13 tests

"Simple Google Content Experiments" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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 plugin369 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP36268176
SVG301168
CSS16025

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity4.00
▷ Minimum class complexity3.00
▷ Maximum class complexity5.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods1191.67%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
No PNG images were found in this plugin