68% gemius-for-wordpress

Code Review | Gemius for WordPress

WordPress plugin Gemius for WordPress scored68%from 54 tests.

About plugin

  • Plugin page: gemius-for-wordpress
  • Plugin version: 1.2.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Oct 31, 2011
  • Latest release: Jul 7, 2023
  • Number of updates: 61
  • Update frequency: every 70.0 days
  • Top authors: tlamedia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /2,368 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.90MB] [CPU: ▼30.21ms] Passed 4 tests

This is a short check of server-side resources used by Gemius for WordPress
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.05 ▼9.61
Dashboard /wp-admin3.05 ▼0.2625.92 ▼19.26
Posts /wp-admin/edit.php3.05 ▼0.3124.39 ▼21.54
Add New Post /wp-admin/post-new.php3.05 ▼2.8427.00 ▼68.64
Media Library /wp-admin/upload.php3.05 ▼0.1923.00 ▼11.38
Gemius /wp-admin/options-general.php?page=gemiuswp3.0525.41

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
gemiuswp_options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Gemius for WordPress
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,879 ▲13314.51 ▲0.2224.81 ▲23.1041.94 ▲0.94
Dashboard /wp-admin2,221 ▲305.80 ▲0.8994.70 ▼7.3540.66 ▲0.97
Posts /wp-admin/edit.php2,100 ▲112.02 ▲0.0135.15 ▼2.3034.07 ▲2.18
Add New Post /wp-admin/post-new.php1,534 ▼123.27 ▲0.18590.74 ▼104.7858.11 ▲0.67
Media Library /wp-admin/upload.php1,400 ▲94.23 ▲0.02102.07 ▲0.0442.99 ▼2.46
Gemius /wp-admin/options-general.php?page=gemiuswp8022.0326.7028.12

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/gemius-for-wordpress/gemius.php+93
    Undefined index: gemius_identifier
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

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=gemiuswp
    • > Notice in wp-content/plugins/gemius-for-wordpress/gemius.php+93
    Undefined index: gemius_identifier

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/gemius-for-wordpress/gemius.php:33

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (The Gemius Audience for WordPress settings panel.) image missing
The official readme.txt might help

gemius-for-wordpress/gemius.php 92% from 13 tests

"Gemius for WordPress" version 1.2.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("gemius-for-wordpress.php" instead of "gemius.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin108 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1262582
PO File17826

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity1.56
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png11.16KB6.09KB▼ 45.43%