73% wpx-google-analytics

Code Review | WPX Google Analytics

WordPress plugin WPX Google Analytics scored73%from 54 tests.

About plugin

  • Plugin page: wpx-google-analytics
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.5
  • WordPress version: 6.3.1
  • First release: Oct 8, 2012
  • Latest release: Feb 18, 2013
  • Number of updates: 11
  • Update frequency: every 12.2 days
  • Top authors: marekbosman (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /5,388 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

Server-side resources used by WPX Google Analytics
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.47 ▼5.95
Dashboard /wp-admin3.33 ▲0.0246.39 ▼3.55
Posts /wp-admin/edit.php3.38 ▲0.0250.68 ▲3.90
Add New Post /wp-admin/post-new.php5.91 ▲0.0285.29 ▼14.60
Media Library /wp-admin/upload.php3.25 ▲0.0235.39 ▼0.43
WPX Google Analytics /wp-admin/options-general.php?page=wpx_google_analytics3.2131.48

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for WPX Google Analytics
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲9414.48 ▼0.311.73 ▼0.0644.72 ▼2.08
Dashboard /wp-admin2,207 ▲165.80 ▼0.0799.91 ▼8.2140.59 ▼4.60
Posts /wp-admin/edit.php2,090 ▲12.02 ▼0.0234.10 ▼7.7732.41 ▼3.74
Add New Post /wp-admin/post-new.php1,545 ▲318.29 ▼0.44595.48 ▼37.6449.02 ▼12.32
Media Library /wp-admin/upload.php1,392 ▲74.20 ▼0.0893.95 ▼5.6142.45 ▼0.78
WPX Google Analytics /wp-admin/options-general.php?page=wpx_google_analytics8382.0222.1428.93

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Uninstall procedure had uncaught errors
    • > User deprecated in wp-includes/functions.php+5737
    Function unregister_setting was called with an argument that is deprecated since version 4.7.0! $sanitize_callback is deprecated. The callback from register_setting() is used instead.
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

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
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wpx-google-analytics/wpx-google-analytics.php:34

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 90% from 29 tests

readme.txt 94% from 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
These attributes need your attention:
  • Screenshots: Screenshot #1 (Google Analytics Settings) image missing
Please take inspiration from this readme.txt

wpx-google-analytics/wpx-google-analytics.php 85% from 13 tests

Analyzing the main PHP file in "WPX Google Analytics" version 1.1
You should first fix the following items:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Description: The description should be shorter than 140 characters (currently 167 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected252 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP14050185
PO File2112267

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity20.00
▷ Minimum class complexity20.00
▷ Maximum class complexity20.00
Average method complexity2.27
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods1493.33%
▷ Protected methods00.00%
▷ Private methods16.67%
Functions0
▷ Named functions00.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
1 PNG file occupies 0.09MB with 0.06MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png95.89KB30.58KB▼ 68.11%