74% article-analytics

Code Review | Article analytics

WordPress plugin Article analytics scored 74% from 54 tests.

About plugin

  • Plugin page: article-analytics
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8.1-3.8.1
  • WordPress version: 5.8.1
  • First release: Mar 18, 2014
  • Latest release: Mar 21, 2014
  • Number of updates: 3
  • Update frequency: every 1.0 days
  • Top authors: dguzun (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 702 total downloads


Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▼1.81MB] [CPU: ▼197.34ms] Passed 4 tests

Server-side resources used by Article analytics
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /1.82 ▼1.026.17 ▼34.32
Dashboard /wp-admin1.83 ▼1.2211.21 ▼40.72
Posts /wp-admin/edit.php1.84 ▼1.275.73 ▼47.34
Add New Post /wp-admin/post-new.php1.83 ▼3.605.34 ▼664.27
Media Library /wp-admin/upload.php1.83 ▼1.175.61 ▼37.04

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 3 new files
Database: 2 new tables, no new options
New tables

Browser metrics Passed 4 tests

This is an overview of browser requirements for Article analytics
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,699 ▲12716.00 ▲0.0612.44 ▲1.4046.78 ▼5.36
Dashboard /wp-admin2,987 ▲535.93 ▼0.03156.83 ▼9.91122.16 ▲7.58
Posts /wp-admin/edit.php2,759 ▲202.71 ▼0.0274.79 ▲5.1187.73 ▼9.08
Add New Post /wp-admin/post-new.php1,594 ▼8920.73 ▲2.80437.13 ▼15.28120.53 ▲6.97
Media Library /wp-admin/upload.php1,827 ▲205.04 ▲0.02170.20 ▼0.13128.05 ▼1.28

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5663
    wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • The plugin did not uninstall successfully, leaving 2 tables in the database
    • wp_article_analytics_info
    • wp_article_analytics_config

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% 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
Almost there! Just fix the following items
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/article-analytics/article-analytics.php:14
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/article-analytics/article-analytics.php on line 11
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/article-analytics/article-analytics.php on line 12

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side


Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: post, analytics, audience

article-analytics/article-analytics.php Passed 13 tests

The principal PHP file in "Article analytics" v. 1.0 is loaded by WordPress automatically on each request
81 characters long description:
Article analytics provides digital analytics of the visitors who read your posts.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin233 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.32
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
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions10100.00%
▷ Anonymous functions00.00%
▷ Global constants2100.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
There are no PNG files in this plugin