72% popular-post-google-analytics-real-time

Code Review | Popular Post Real Time

WordPress plugin Popular Post Real Time scored72%from 54 tests.

About plugin

  • Plugin page: popular-post-goog...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-3.4
  • WordPress version: 6.3.1
  • First release: Sep 27, 2016
  • Latest release: Sep 27, 2016
  • Number of updates: 6
  • Update frequency: every 2.5 days
  • Top authors: vicenteguerra (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /726 total downloads

Benchmarks

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
This plugin's installer ran successfully

Server metrics [RAM: ▼1.02MB] [CPU: ▼40.31ms] Passed 4 tests

Analyzing server-side resources used by Popular Post Real Time
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.99 ▼0.5117.28 ▼21.08
Dashboard /wp-admin3.04 ▼0.3420.44 ▼41.21
Posts /wp-admin/edit.php3.04 ▼0.3520.48 ▼27.36
Add New Post /wp-admin/post-new.php3.04 ▼2.8821.26 ▼71.59
Media Library /wp-admin/upload.php3.04 ▼0.2221.63 ▼14.18
Popular Post RT /wp-admin/options-general.php?page=popularpostrealtime_settings3.0418.62

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: no files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
popularpostrealtime_version
widget_recent-posts

Browser metrics Passed 4 tests

Popular Post Real Time: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲6113.20 ▼1.381.65 ▲0.0042.50 ▲0.71
Dashboard /wp-admin2,216 ▲304.87 ▼0.09110.58 ▼3.7143.56 ▲2.45
Posts /wp-admin/edit.php2,096 ▲72.03 ▲0.0438.67 ▲1.4436.87 ▲3.19
Add New Post /wp-admin/post-new.php1,539 ▲523.21 ▲0.09676.76 ▲55.4863.71 ▲6.17
Media Library /wp-admin/upload.php1,395 ▲44.22 ▼0.0698.07 ▼2.7243.24 ▲1.55
Popular Post RT /wp-admin/options-general.php?page=popularpostrealtime_settings1,0693.1052.6527.88

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/popular-post-google-analytics-real-time/includes/class-popularpostrealtime-settings.php+120
    Undefined variable: status
  • This plugin does not fully uninstall, leaving 7 options in the database
    • theysaidso_admin_options
    • popularpostrealtime_version
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=popularpostrealtime_settings
    • > Notice in wp-content/plugins/popular-post-google-analytics-real-time/includes/class-popularpostrealtime-settings.php+120
    Undefined variable: status
    • > GET request to /wp-admin/options-general.php?page=popularpostrealtime_settings
    • > Notice in wp-content/plugins/popular-post-google-analytics-real-time/includes/class-popularpostrealtime-settings.php+151
    Undefined index: HOME

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 79% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === popular-post-google-analytics-real-time === )
  • Donate link: Invalid URI found ("vicenteguerra.github.io")
  • Screenshots: These screenshots need descriptions #1, #2, #3 in popular-post-google-analytics-real-time/assets to your readme.txt
Please take inspiration from this readme.txt

popular-post-google-analytics-real-time/popularpostrealtime.php 77% from 13 tests

The entry point to "Popular Post Real Time" version 1.0 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("popular-post-google-analytics-real-time.php" instead of "popularpostrealtime.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
  • Requires at least: Required version does not match the one declared in readme.txt ("3.4" instead of "4.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin1,322 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP94366021,271
Markdown133043
JavaScript5308

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity13.60
▷ Minimum class complexity1.00
▷ Maximum class complexity61.00
Average method complexity2.56
▷ Minimum method complexity1.00
▷ Maximum method complexity43.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes110.00%
▷ Concrete classes990.00%
▷ Final classes00.00%
Methods81
▷ Static methods33.70%
▷ Public methods7795.06%
▷ Protected methods22.47%
▷ Private methods22.47%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants00.00%
▷ Class constants10100.00%
▷ Public constants10100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

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