68% ga-article-audit

Code Review | WP Article Audit using Google Analytics

WordPress plugin WP Article Audit using Google Analytics scored68%from 54 tests.

About plugin

  • Plugin page: ga-article-audit
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.5.2
  • WordPress version: 6.3.1
  • First release: May 26, 2016
  • Latest release: May 26, 2016
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: Debiprasad (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /613 total downloads


Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.83MB] [CPU: ▼34.89ms] Passed 4 tests

A check of server-side resources used by WP Article Audit using Google Analytics
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1336.75 ▼3.50
Dashboard /wp-admin3.13 ▼0.2221.51 ▼36.47
Posts /wp-admin/edit.php3.13 ▼0.2325.61 ▼21.29
Add New Post /wp-admin/post-new.php3.13 ▼2.7625.07 ▼72.09
Media Library /wp-admin/upload.php3.13 ▼0.1024.48 ▼9.72

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 176 new files
Database: no new tables, 7 new options
New WordPress options

Browser metrics Passed 4 tests

An overview of browser requirements for WP Article Audit using Google Analytics
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.35 ▼0.001.62 ▼0.2140.56 ▼4.15
Dashboard /wp-admin2,220 ▲405.72 ▲0.1093.93 ▲5.7938.04 ▼5.87
Posts /wp-admin/edit.php2,125 ▲252.21 ▲0.2239.82 ▲2.6136.43 ▲1.88
Add New Post /wp-admin/post-new.php1,547 ▲1923.50 ▲0.23647.64 ▼50.6663.60 ▼1.38
Media Library /wp-admin/upload.php1,425 ▲314.30 ▲0.1294.44 ▼5.4040.18 ▼4.43

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > User deprecated in wp-includes/functions.php+5453
    Function add_utility_page is deprecated since version 4.5.0! Use add_menu_page() instead.
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • ga_article_audit_db_version

Smoke tests 50% from 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 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 7× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/ga-article-audit/google-api-php-client/examples/fileupload.php
    • > /wp-content/plugins/ga-article-audit/google-api-php-client/examples/batch.php
    • > /wp-content/plugins/ga-article-audit/google-api-php-client/examples/index.php
    • > /wp-content/plugins/ga-article-audit/google-api-php-client/examples/idtoken.php
    • > /wp-content/plugins/ga-article-audit/google-api-php-client/examples/user-example.php
    • > /wp-content/plugins/ga-article-audit/google-api-php-client/examples/multi-api.php
    • > /wp-content/plugins/ga-article-audit/google-api-php-client/examples/simplefileupload.php
  • 101× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/ga-article-audit/google-api-php-client/src/Google/Service/Fusiontables.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/ga-article-audit/google-api-php-client/src/Google/Service/Drive.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/ga-article-audit/google-api-php-client/src/Google/Service/Blogger.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/ga-article-audit/google-api-php-client/src/Google/Service/Translate.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/ga-article-audit/google-api-php-client/src/Google/Service/Taskqueue.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'BaseTest' not found in wp-content/plugins/ga-article-audit/google-api-php-client/tests/youtube/YouTubeTest.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/ga-article-audit/google-api-php-client/src/Google/Service/Groupssettings.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'BaseTest' not found in wp-content/plugins/ga-article-audit/google-api-php-client/tests/plus/PlusTest.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'BaseTest' not found in wp-content/plugins/ga-article-audit/google-api-php-client/tests/general/ApiMediaFileUploadTest.php:21
    • > PHP Warning
      fgets() expects parameter 1 to be resource, string given in wp-content/plugins/ga-article-audit/google-api-php-client/tests/OAuthHelper.php on line 40

User-side errors Passed 1 test

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


Plugin configuration Passed 29 tests

readme.txt Passed 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
5 plugin tags: seo, analytics, google, search engine optimization, google analytics

ga-article-audit/ga-article-audit.php Passed 13 tests

The principal PHP file in "WP Article Audit using Google Analytics" v. 1.0 is loaded by WordPress automatically on each request
135 characters long description:
A WordPress plugin to help you audit your articles posted on your WordPress blog with the help of Google Analytics data of the website.

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
There were no executable files found in this plugin154,693 lines of code in 166 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.02
Average class complexity1.27
▷ Minimum class complexity1.00
▷ Maximum class complexity102.00
Average method complexity1.03
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
▷ Abstract classes60.22%
▷ Concrete classes2,73499.78%
▷ Final classes00.00%
▷ Static methods150.07%
▷ Public methods21,46699.56%
▷ Protected methods310.14%
▷ Private methods630.29%
▷ Named functions777.78%
▷ Anonymous functions222.22%
▷ Global constants10.43%
▷ Class constants23099.57%
▷ Public constants230100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin