88% really-simple-ga

Code Review | Really Simple GA

WordPress plugin Really Simple GA scored 88% from 53 tests.

About plugin

  • Plugin page: really-simple-ga
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-5.5
  • WordPress version: 5.8.1
  • First release: Oct 28, 2020
  • Latest release: Nov 22, 2020
  • Number of updates: 5
  • Update frequency: every 9.0 days
  • Top authors: infotwsmedia (100%)

Code review

53 tests

User reviews

1 review

Install metrics

10+ active / 132 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Really Simple GA
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1242.58 ▲22.21
Dashboard /wp-admin3.08 ▲0.0242.20 ▼1.58
Posts /wp-admin/edit.php3.13 ▲0.0242.59 ▼1.94
Add New Post /wp-admin/post-new.php5.44 ▲0.0190.82 ▼1,026.83
Media Library /wp-admin/upload.php3.02 ▲0.0129.83 ▼8.57
Really Simple GA /wp-admin/options-general.php?page=really-simple-ga2.9728.75

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Really Simple GA
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,654 ▲4916.21 ▲0.667.90 ▲0.4050.11 ▲4.79
Dashboard /wp-admin2,937 ▲845.90 ▲0.06137.42 ▲1.56100.72 ▲2.82
Posts /wp-admin/edit.php2,711 ▲82.70 ▲0.0165.40 ▲3.4189.59 ▲0.87
Add New Post /wp-admin/post-new.php3,708 ▲2,05514.94 ▼3.85412.69 ▲47.16110.74 ▲4.92
Media Library /wp-admin/upload.php1,774 ▲55.01 ▲0.02150.65 ▼1.38115.22 ▼3.82
Really Simple GA /wp-admin/options-general.php?page=really-simple-ga1,0312.0953.0064.22

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

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

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
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=really-simple-ga
    • > Notice in wp-content/plugins/really-simple-ga/admin-screen.php+37
    Undefined variable: success
    • > GET request to /wp-admin/options-general.php?page=really-simple-ga
    • > Notice in wp-content/plugins/really-simple-ga/admin-screen.php+38
    Undefined variable: error

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 items
  • 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/really-simple-ga/admin-screen.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 97% 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
Please fix the following attributes:
  • Screenshots: Screenshot #3 (Check in frontend side.) image missing
The official readme.txt is a good inspiration

really-simple-ga/really-simple-ga.php Passed 13 tests

"Really Simple GA" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
76 characters long description:
It will easily add Google Analytics code to site without adding extra codes.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin93 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2161993

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.33
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin