74% gwp-histats

Code Review | GWP-Histats

WordPress plugin GWP-Histats scored74%from 54 tests.

About plugin

  • Plugin page: gwp-histats
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.1
  • WordPress version: 6.3.1
  • First release: Dec 29, 2017
  • Latest release: Jan 21, 2023
  • Number of updates: 17
  • Update frequency: every 108.8 days
  • Top authors: karlkiesinger (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

1,000+ active /10,312 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▼0.93MB] [CPU: ▼28.18ms] Passed 4 tests

An overview of server-side resources used by GWP-Histats
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0341.07 ▲2.24
Dashboard /wp-admin3.02 ▼0.2928.16 ▼16.63
Posts /wp-admin/edit.php3.02 ▼0.3424.18 ▼24.42
Add New Post /wp-admin/post-new.php3.02 ▼2.8723.28 ▼63.13
Media Library /wp-admin/upload.php3.02 ▼0.2125.47 ▼8.55

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 10 new options
New WordPress options
db_upgraded
widget_recent-comments
gwphistats_action
theysaidso_admin_options
gwphistats_webid
widget_theysaidso_widget
gwphistats_active
widget_recent-posts
gwphistats_pluginversion
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for GWP-Histats
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲8113.55 ▼0.831.72 ▼0.0544.49 ▼11.72
Dashboard /wp-admin2,225 ▲434.90 ▼0.9798.34 ▼8.9239.06 ▼2.73
Posts /wp-admin/edit.php2,105 ▲162.04 ▼0.0533.00 ▼5.3433.22 ▲2.41
Add New Post /wp-admin/post-new.php1,547 ▲1423.11 ▼0.08630.95 ▼54.1255.52 ▼7.57
Media Library /wp-admin/upload.php1,407 ▲164.17 ▼0.0893.92 ▼5.2442.32 ▼1.18

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5905
    Function add_menu_page was called incorrectly. The seventh parameter passed to add_menu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 6.0.0.)
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/gwp-histats/gwp-histats.php:207

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: histats, tracking, tracking visitors

gwp-histats/gwp-histats.php 92% from 13 tests

"GWP-Histats" version 1.0'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:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 259 characters long)

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
There were no executable files found in this plugin155 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP23535155

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
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
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected