10% post-analytics-by-algohex

Code Review | Post Analytics by Algohex

WordPress plugin Post Analytics by Algohex scored10%from 54 tests.

About plugin

  • Plugin page: post-analytics-by...
  • Plugin version: 0.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.2
  • WordPress version: 6.3.1
  • First release: Jul 30, 2019
  • Latest release: Aug 4, 2019
  • Number of updates: 6
  • Update frequency: every 0.8 days
  • Top authors: algohex (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /447 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • The plugin did not install without errors
    • > Warning in wp-content/plugins/post-analytics-by-algohex/includes/class-wp-post-analytics-by-algohex-activator.php+36
    count(): Parameter must be an array or an object that implements Countable

Server metrics [RAM: ▲0.07MB] [CPU: ▼7.24ms] Passed 4 tests

A check of server-side resources used by Post Analytics by Algohex
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0839.94 ▼2.50
Dashboard /wp-admin3.38 ▲0.0351.18 ▼11.61
Posts /wp-admin/edit.php3.49 ▲0.1451.46 ▲1.59
Add New Post /wp-admin/post-new.php5.98 ▲0.0990.13 ▼10.21
Media Library /wp-admin/upload.php3.30 ▲0.0732.91 ▼4.63
Dashboard /wp-admin/admin.php?page=algohex-post-analytics3.2737.19
Setting /wp-admin/admin.php?page=algohex-post-analytics-setting3.2729.99

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 22 new files
Database: 1 new table, 7 new options
New tables
wp_algo_post_analytics
New WordPress options
theysaidso_admin_options
widget_recent-comments
delete_data_when_deactivated
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Post Analytics by Algohex
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,910 ▲16413.68 ▼0.705.80 ▲3.9541.73 ▼4.30
Dashboard /wp-admin2,230 ▲395.81 ▼0.1096.44 ▼7.7543.96 ▼0.07
Posts /wp-admin/edit.php2,116 ▲272.00 ▼0.0235.95 ▼1.9037.95 ▲2.44
Add New Post /wp-admin/post-new.php1,541 ▲2723.44 ▲5.85687.64 ▼15.0456.22 ▼9.89
Media Library /wp-admin/upload.php1,412 ▲334.21 ▼0.1097.62 ▼6.0644.32 ▲1.33
Dashboard /wp-admin/admin.php?page=algohex-post-analytics8162.0624.6935.04
Setting /wp-admin/admin.php?page=algohex-post-analytics-setting8332.0325.7328.08

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_algo_post_analytics
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
The following issues need your attention
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/post-analytics-by-algohex/public/partials/wp-post-analytics-by-algohex-public-display.php
    • > /wp-content/plugins/post-analytics-by-algohex/admin/partials/wp-post-analytics-by-algohex-admin-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots lack descriptions #1, #2 in post-analytics-by-algohex/assets to your readme.txt
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === post-analytics-by-algohex === )
Please take inspiration from this readme.txt

post-analytics-by-algohex/wp-post-analytics-by-algohex.php 85% from 13 tests

"Post Analytics by Algohex" version 0.1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("post-analytics-by-algohex.php" instead of "wp-post-analytics-by-algohex.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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 plugin427 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12135549374
CSS27947
JavaScript24546

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity4.86
▷ Minimum class complexity1.00
▷ Maximum class complexity23.00
Average method complexity1.93
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods29
▷ Static methods00.00%
▷ Public methods2482.76%
▷ Protected methods00.00%
▷ Private methods517.24%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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 were not PNG files found in your plugin