84% my-analytics-code

Code Review | My Analytics Code

WordPress plugin My Analytics Code scored84%from 54 tests.

About plugin

  • Plugin page: my-analytics-code
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Aug 18, 2017
  • Latest release: Jan 10, 2019
  • Number of updates: 8
  • Update frequency: every 63.8 days
  • Top authors: abyrafa (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /656 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
Install script ran successfully

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

Analyzing server-side resources used by My Analytics Code
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0143.15 ▲5.49
Dashboard /wp-admin3.32 ▼0.0244.02 ▼16.36
Posts /wp-admin/edit.php3.38 ▲0.0245.23 ▲0.86
Add New Post /wp-admin/post-new.php5.90 ▲0.0290.28 ▼2.64
Media Library /wp-admin/upload.php3.25 ▲0.0233.95 ▼2.29
My Anaytics Code /wp-admin/options-general.php?page=my-anaytics-code3.2132.06

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for My Analytics Code
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲2214.51 ▲0.161.58 ▼0.2739.16 ▼1.30
Dashboard /wp-admin2,202 ▲225.62 ▼0.0583.74 ▼4.2438.54 ▼0.41
Posts /wp-admin/edit.php2,104 ▲42.03 ▲0.0142.73 ▲7.8938.16 ▲0.14
Add New Post /wp-admin/post-new.php1,540 ▲1418.23 ▼5.32593.78 ▼69.0466.13 ▲16.39
Media Library /wp-admin/upload.php1,404 ▲14.16 ▼0.0496.71 ▼6.2441.91 ▼1.17
My Anaytics Code /wp-admin/options-general.php?page=my-anaytics-code8932.1626.4434.15

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • 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)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/my-analytics-code/my-analytics-code.php:32

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

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: analytics, google, google analytics, tracking

my-analytics-code/my-analytics-code.php 85% from 13 tests

"My Analytics Code" version 1.0.0'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:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Description: Please keep the plugin description shorter than 140 characters (currently 148 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 detected72 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP192672

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin