90% easy-peasy-google-analytics

Code Review | Easy Peasy Google Analytics

WordPress plugin Easy Peasy Google Analytics scored90%from 54 tests.

About plugin

  • Plugin page: easy-peasy-google...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-3.9
  • WordPress version: 6.3.1
  • First release: Mar 21, 2014
  • Latest release: Jun 1, 2019
  • Number of updates: 69
  • Update frequency: every 29.0 days
  • Top authors: alessandro.tesoro (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /2,290 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼5.20ms] Passed 4 tests

Server-side resources used by Easy Peasy Google Analytics
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0344.28 ▲5.15
Dashboard /wp-admin3.34 ▲0.0348.35 ▲1.74
Posts /wp-admin/edit.php3.39 ▲0.0347.92 ▼1.93
Add New Post /wp-admin/post-new.php5.92 ▲0.0383.05 ▼20.40
Media Library /wp-admin/upload.php3.26 ▲0.0335.12 ▼0.20

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Easy Peasy Google Analytics
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲5913.38 ▼1.3018.00 ▲16.2543.52 ▲2.75
Dashboard /wp-admin2,209 ▲214.88 ▼0.01100.72 ▼12.4642.75 ▲0.04
Posts /wp-admin/edit.php2,092 ▼01.99 ▼0.0734.77 ▼6.7731.13 ▼3.42
Add New Post /wp-admin/post-new.php1,534 ▲1223.39 ▲0.30682.91 ▲6.9452.95 ▲0.38
Media Library /wp-admin/upload.php1,388 ▲34.20 ▲0.0592.94 ▼5.3441.76 ▼0.87

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
8 plugin tags: analytics, easy google analytic, google analytic, tracking, easy google analytics...

easy-peasy-google-analytics/easy-peasy-google-analytics.php 92% from 13 tests

"Easy Peasy Google Analytics" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 164 characters long)

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
Success! There were no dangerous files found in this plugin94 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1366894

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.07
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.25
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png7.10KB3.05KB▼ 56.99%
screenshot-2.png15.95KB6.25KB▼ 60.84%