77% addweb-google-popular-post

Code Review | Traffic Post Page Views

WordPress plugin Traffic Post Page Views scored77%from 54 tests.

About plugin

  • Plugin page: addweb-google-pop...
  • Plugin version: 2.4.1
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.4.1
  • WordPress version: 6.3.1
  • First release: May 27, 2019
  • Latest release: Nov 27, 2023
  • Number of updates: 36
  • Update frequency: every 45.7 days
  • Top authors: AddWeb Solution Pvt. Ltd. (88.89%)snehaladdweb (13.89%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,948 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
Installer ran successfully

Server metrics [RAM: ▲0.16MB] [CPU: ▼3.26ms] Passed 4 tests

This is a short check of server-side resources used by Traffic Post Page Views
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0924.38 ▼14.95
Dashboard /wp-admin3.48 ▲0.1845.59 ▼1.07
Posts /wp-admin/edit.php3.59 ▲0.2449.41 ▲4.35
Add New Post /wp-admin/post-new.php6.08 ▲0.1991.62 ▼0.33
Media Library /wp-admin/upload.php3.40 ▲0.1735.75 ▲3.31
Traffic Post Page Views Admin Panel /wp-admin/options-general.php?page=addweb-traffic-post-page-views3.3532.77

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 30 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_gd-analytic-top-posts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Traffic Post Page Views
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,428 ▼33414.67 ▲0.370.63 ▼1.082.71 ▼42.36
Dashboard /wp-admin2,208 ▲315.64 ▲0.0693.36 ▼7.1438.47 ▼7.66
Posts /wp-admin/edit.php2,110 ▲102.02 ▲0.0140.36 ▲1.7834.75 ▼4.83
Add New Post /wp-admin/post-new.php1,535 ▲822.80 ▼0.24601.74 ▼52.3459.99 ▲17.46
Media Library /wp-admin/upload.php1,413 ▲164.28 ▲0.0297.87 ▼3.2144.29 ▲1.76
Traffic Post Page Views Admin Panel /wp-admin/options-general.php?page=addweb-traffic-post-page-views1,7651.9634.9542.37

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_gd-analytic-top-posts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=addweb-traffic-post-page-views
    • > Notice in wp-content/plugins/addweb-google-popular-post/traffic-post-page-views.php+370
    Undefined index: tapp_clientid
    • > GET request to /wp-admin/options-general.php?page=addweb-traffic-post-page-views
    • > Notice in wp-content/plugins/addweb-google-popular-post/traffic-post-page-views.php+373
    Undefined index: tapp_psecret

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
Please take a closer look at the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/addweb-google-popular-post/inc/functions.php:53
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/addweb-google-popular-post/inc/functions.php:53

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, but this is not an exhaustive test

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Donate link: Invalid URI found ("#")
  • Requires php: The plugin version is formatted incorrectly
You can take inspiration from this readme.txt

addweb-google-popular-post/traffic-post-page-views.php 85% from 13 tests

Analyzing the main PHP file in "Traffic Post Page Views" version 2.4.1
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("addweb-google-popular-post.php" instead of "traffic-post-page-views.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 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin6,124 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript5451812,765
CSS81181061,937
PHP225343735
SVG714687

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions18
▷ Named functions1794.44%
▷ Anonymous functions15.56%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
4 PNG files occupy 0.07MB with 0.03MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/img/wewp-logo.png39.91KB20.18KB▼ 49.44%
inc/css/images/controls.png2.74KB1.42KB▼ 48.29%
inc/img/wewp-ad-plugin-400.png15.32KB8.89KB▼ 42.00%
inc/img/addweb-logo.png11.75KB4.57KB▼ 61.12%