78% addweb-google-popular-post

Code Review | Traffic Post Page Views

WordPress plugin Traffic Post Page Views scored 78% from 54 tests.

About plugin

  • Plugin page: addweb-google-pop...
  • Plugin version: 2.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-5.8
  • WordPress version: 5.9.2
  • First release: May 27, 2019
  • Latest release: Jul 21, 2021
  • Number of updates: 16
  • Update frequency: every 49.2 days
  • Top authors: AddWeb Solution Pvt. Ltd. (75%)snehaladdweb (31.25%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,190 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.20MB] [CPU: ▼312.47ms] Passed 4 tests

A 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.63 ▲0.1152.42 ▼4.19
Dashboard /wp-admin3.42 ▲0.0125.01 ▼15.63
Posts /wp-admin/edit.php3.46 ▼0.1825.53 ▼14.05
Add New Post /wp-admin/post-new.php6.20 ▼0.7779.28 ▼1,216.00
Media Library /wp-admin/upload.php3.43 ▲0.1321.12 ▼3.57
Traffic Post Page Views Admin Panel /wp-admin/options-general.php?page=addweb-traffic-post-page-views3.4022.83

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 17 new files
Database: no new tables, 1 new option
New WordPress options
widget_gd-analytic-top-posts

Browser metrics Passed 4 tests

Checking browser requirements for Traffic Post Page Views
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,936 ▲18216.62 ▲0.6315.69 ▲9.4611.45 ▲8.50
Dashboard /wp-admin2,904 ▲436.15 ▼0.04119.98 ▼17.42152.17 ▼10.12
Posts /wp-admin/edit.php2,704 ▲193.39 ▲0.0362.30 ▼5.75137.97 ▼9.04
Add New Post /wp-admin/post-new.php1,701 ▼5719.10 ▼2.85427.95 ▼27.43164.71 ▲8.58
Media Library /wp-admin/upload.php1,711 ▲85.60 ▲0.07140.11 ▼12.50184.12 ▼7.12
Traffic Post Page Views Admin Panel /wp-admin/options-general.php?page=addweb-traffic-post-page-views1,0212.8756.68114.21

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 1 option
    • widget_gd-analytic-top-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > 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+158
    Undefined index: tapp_startdate

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > 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 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% 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 need to be fixed:
  • Donate link: Invalid URI ("")
The official readme.txt is a good inspiration

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.0
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("addweb-google-popular-post.php" instead of "traffic-post-page-views.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected5,319 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript5450812,764
CSS6100981,875
PHP224642680

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
inc/css/images/controls.png2.74KB1.42KB▼ 48.29%