84% google-content-experiments

Code Review | Google Content Experiments

WordPress plugin Google Content Experiments scored 84% from 54 tests.

About plugin

  • Plugin page: google-content-ex...
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4.0-3.8
  • WordPress version: 6.3.1
  • First release: Jul 22, 2012
  • Latest release: Dec 14, 2013
  • Number of updates: 18
  • Update frequency: every 28.4 days
  • Top authors: GlennM (100%)

Code review

54 tests

User reviews

15 reviews

Install metrics

300+ active / 16,207 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.87ms] Passed 4 tests

An overview of server-side resources used by Google Content Experiments
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.59 ▼2.40
Dashboard /wp-admin3.31 ▲0.0143.97 ▼5.69
Posts /wp-admin/edit.php3.36 ▲0.0048.72 ▲2.89
Add New Post /wp-admin/post-new.php5.92 ▲0.0388.41 ▼1.34
Media Library /wp-admin/upload.php3.23 ▲0.0033.87 ▼2.05

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Google Content Experiments
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.22 ▼1.531.59 ▼0.7339.63 ▼1.87
Dashboard /wp-admin2,206 ▲185.86 ▼0.0294.90 ▼12.2238.30 ▼2.83
Posts /wp-admin/edit.php2,089 ▼02.04 ▼0.0139.80 ▲2.5734.96 ▼0.01
Add New Post /wp-admin/post-new.php6,467 ▲4,94720.11 ▼3.33948.21 ▲281.1160.85 ▲3.85
Media Library /wp-admin/upload.php1,385 ▼34.16 ▼0.0792.72 ▼7.1345.54 ▲1.01

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/google-content-experiments/google-content-experiments.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
1 plugin tags: google content experiment

google-content-experiments/google-content-experiments.php Passed 13 tests

"Google Content Experiments" version 1.0.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
81 characters long description:
This plugin enables you to use Google Content Experiments on your WordPress site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected195 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP33659162
PO File15627
JavaScript1106

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity11.00
▷ Minimum class complexity10.00
▷ Maximum class complexity12.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
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